In HTML, you can use the comment tags "" to make single-line comments. The browser will not display the content of the comment, but it can help developers record HTML documents. .
The operating environment of this article: windows7 system, HTML5&&CSS3 version, DELL G3 computer.
Comment tags are used to insert comments in HTML.
HTML comment tag
You can add comments to HTML source code through the following syntax:
<!-- 在此处写注释 -->
Comment: There is an exclamation point in the opening tag, But not in the 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:
HTML comment example:
<!--这是单行注释--> <!-- 这是多行注释 这是多行注释 这是多行注释 -->
【Recommended learning: HTML video tutorial】
The above is the detailed content of How to comment a single line of html. For more information, please follow other related articles on the PHP Chinese website!