HTML comments

What are code comments? The function of code comments is to help programmers mark the purpose of the code. If you look at the code you wrote after a while, you can quickly remember the purpose of this code. Code comments not only make it easier for programmers to recall the purpose of previous code, but also help other programmers quickly understand the functions of your program, making it easier for multiple people to collaborate on developing web page code.

Syntax:

<!--Comment text-->

Example

<!-- Write your comments here -->

Comment: There is an exclamation point in the opening tag, but There is no closing tag.

The browser will not display comments, but they can help record your HTML document.

You can use comments to place notifications and reminders in HTML:

<!DOCTYPE html>
<html>

<body>

<!--这是一段注释。注释不会在浏览器中显示。-->

<p>这是一段普通的段落。</p>

</body>
</html>


Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>HTML的代码注释</title> </head> <body> <!--在线咨询 begin--> <div> <p>一站式报名咨询、助学答疑服务,无论是报名、选课、学习、做作业、考试、写论文,毕业,这里都有专业老师为你答疑解惑!<a href="#">向报名顾问咨询</a></p> </div> <!--<a href="#">是链接到本页,因为你有的时候需要有个链接的样式,但是又不希望他跳转,就可以这样写--> <!--在线咨询 end--> </body> </html>
submitReset Code