Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the HTML comment tag?

Shulou Source: shulou.com Published: 2022-06-01 05:39:03 10月14日 Update

This article mainly introduces the relevant knowledge of "what is the HTML comment tag". The editor shows you the operation process through the actual case. The operation method is simple, fast and practical. I hope this article "what is the HTML comment tag" can help you solve the problem.

HTML comments:

This is a paragraph.

Browser support

All major browsers support comment tags.

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-insideinclude), or complex execution of other commands to dynamically generate the contents of the document.

The difference between HTML4.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.

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

This is the end of the content about "what is the HTML comment tag". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Comments tags attributes documents support events information standards browsers services browsing code content commands text more servers knowledge actions situations Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Xiaomi Shulou Technology vpn Microsoft