Introduction to HTML Annotation
Almost most web programming languages have the function of annotations. HTML annotations start with <!-- and end with -->. The content in between will be regarded as annotations by the browser and displayed on the web page It will be ignored when you check the source code. HTML annotations are used for maintenance by web designers.
Standard HTML annotation writing
<!-- ... Here is the comment text ... -->
The text in the comment block will not be displayed on the web page, even if the HTML code is written in the block, it will not be executed! The browser will judge by itself. Almost all mainstream browsers can judge normally. In addition to single-line annotations, such annotations can also contain multiple-line annotations at once.
Simple example of HTML annotation
The single quotation mark on the right is the comment content "<!--Here is the comment text-->"
The single quotation mark on the right is the content of the comment ""
Simple example of HTML multi-line comments
Here is multi-line HTML annotation text
Here is multi-line HTML annotation text
-->
Differences between HTML annotations and CSS syntax
With the evolution of CSS technology, it has become commonplace to add CSS syntax to web pages, but the beginning and end of CSS syntax will be marked with similar HTML annotations. How does the browser judge it? A CSS syntax combined with an HTML page may be similar to the following, usually placed between the <head></head> tags.
<!--
...Here is CSS Code...
-->
</style>
Post a Comment
0 Comments