Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of comment tags in HTML?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the use of annotation tags in HTML, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand it.

Example

HTML comments:

This is a paragraph.

Label definition and instructions for use

Comment tags are used to insert comments in the source document. Comments are not displayed in the browser.

You can use comments to interpret your code, which helps you edit the code at a later time. It is especially useful when there is a large amount of code.

You can also store customized information for the program in the comments content. In this case, this information is not visible to the user, but is available to the program. It is a good habit to put comments or style elements in the comment text to prevent old browsers that do not support scripts or styles from displaying them as plain text.

Comment: the last two forward slashes (/ /) on the command line are JavaScript comment symbols. This ensures that JavaScript does not execute the-- > tag.

In addition to having a very obvious role in the source document, many Web servers also use annotations to implement the unique features of the document server software. These servers can scan the document, find a specific sequence of characters in traditional HTML/XHTML comments, and then take action based on the commands embedded in the comments. These actions may simply include text from other files (so-called server-side inclusion, server-inside include), or complex execution of other commands to dynamically generate the contents of the document.

Differences between HTML 4.01 and HTML5

None.

Standard attribute

Comment tags do not support any standard attributes.

For more information about the HTML standard properties, visit the standard properties.

Event attribute

The comment tag does not support any event attributes.

Thank you for reading this article carefully. I hope the article "what is the use of comments and tags in HTML" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report