<pre>:預格式化標簽
<code>:將字符設置為等寬字符的標簽
在html文件中需要顯示一些比如< >這種符號時需要使用到實體化字符
> <
< >
<! DOCTYPE html> <html> <head> <title>預格式化</title> <meta charset = “utf-8”> <meta name = “viewport” content = “width=device-width, initial-scale=1.0”> <meta name = “keyword” content = “預格式化文本”> <meta name = “description” content = “預格式化純文本”> <meta author = “王思怡”> <style> body{ background:pink; } </style> </head> <body> <!—- 以下代碼的括號需要使用實體化字符來寫 —-> <pre> <DOCTYPE !html> <html> <head> <title>預格式化</title> <meta charset = “utf-8”> <meta name = “viewport” content = “width=device-width” initial = 1.0> <meta name = “keyword” content = “預格式化文本”> <meta name = “description” content = “預格式化純文本”> <meta author = “王思怡”> <style> body{ background:pink; } </style> </head> </html> </pre> <body> </html>
<!DOCTYPE html> <html> <head> <title>code標簽的使用</title> <meta charset = “utf-8”> <meta name = “viewport” content = “width=device-width, initial-scale=1.0”> <meta name = “keyword” content = “code標簽的使用”> <meta name = “description” content = “code標簽的使用”> <meta author = “王思怡”> <style> body{ background:pink; } </style> </head> <body> <pre> <code> <DOCTYPE !html> <html> <head> <title>預格式化</title> <meta charset = “utf-8”> <meta name = “viewport” content = “width=device-width” initial = 1.0> <meta name = “keyword” content = “預格式化文本”> <meta name = “description” content = “預格式化純文本”> <meta author = “王思怡”> <style> body{ background:pink; } </style> </head> </html> </code> </pre> </body> </html>