Home > Web Front-end > HTML Tutorial > How to annotate pages in html

How to annotate pages in html

醉折花枝作酒筹
Release: 2021-06-07 17:56:28
Original
5728 people have browsed it

In HTML, you can use "" to make page comments. You only need to add "" at the specified position on the page. The browser will not display comments, but it can help record your HTML document, and it is also very helpful for HTML error correction.

How to annotate pages in html

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 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:

Example

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

Comment: There is an exclamation mark in the opening tag, but in the closing tag No.

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:

Example

<!DOCTYPE html>
<html>

<body>

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

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

</body>
</html>
Copy after login

Comments are also very helpful for HTML debugging, because you can comment one line of HTML at a time Code to search for errors:

<!DOCTYPE html>
<html>
<body>

<!-- 此时不显示图片
<img border="0" src="/i/tulip_ballade.jpg" alt="Tulip">
-->

</body>
</html>
Copy after login

Conditional comments

You may occasionally find conditional comments in HTML:

<!--[if IE 8]>
    .... some HTML here ....
<![endif]-->
Copy after login

Conditional comments define HTML tags that only Internet Explorer executes.

Software Program Tags

Various HTML software programs can also generate HTML comments.

For example, the tag will be surrounded by HTML comments created by FrontPage and Expression Web.

As a rule, the existence of these tags helps support the software that created them.

Recommended learning: html video tutorial

The above is the detailed content of How to annotate pages in 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