Home > Web Front-end > Front-end Q&A > How to comment a single line of html

How to comment a single line of html

藏色散人
Release: 2023-01-05 16:12:11
Original
4355 people have browsed it

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. .

How to comment a single line of html

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:

<!-- 在此处写注释 -->
Copy after login

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:

<!--这是单行注释-->
<!--
    这是多行注释
    这是多行注释
    这是多行注释
-->
Copy after login

【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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template