how to show html code in html page
To show HTML code in HTML page, you can use the <code> tag or the <pre> tag.
Example using <code> tag:
<code>
<html>
<head>
<title>My HTML Page</title>
</head>
<body>
<p>This is an example of HTML code.</p>
</body>
</html>
</code>
Example using <pre> tag:
<pre>
<html>
<head>
<title>My HTML Page</title>
</head>
<body>
<p>This is an example of HTML code.</p>
</body>
</html>
</pre>
Both tags will display the HTML code as plain text with the correct syntax highlighting.
原文地址: https://www.cveoy.top/t/topic/bcWL 著作权归作者所有。请勿转载和采集!