答:使用语法 "<!-- text -->"
HTML中的注释通常用于解释标记。这将帮助您和其他人在编辑源代码时快速轻松地选择或找到文档中的特定部分。注释只会被忽略,浏览器不会显示它们。
HTML注释以开头<!--,以结束-->。这是一个例子:
例试试这个代码»
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Comments in HTML</title>
</head>
<body>
<!-- This is a single line HTML comment -->
<!-- This is an example of a
HTML multi-line comment -->
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h61005.shtml