Only one comment character "" is supported in html. All content contained between "" will be regarded as For comments; the "" character can realize single-line comments or multi-line comments. You only need to ensure that the content of the comment is between "" Can. "" comments can appear anywhere in an HTML document, including at the beginning of the document, at the end of the document, in the middle of the document, outside the tag, within the tag content, etc.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
HTML comments (with examples)
HTML comments are mainly used to explain the code in the document, and comments are also code part, but the browser will automatically ignore the content of the annotation, so users cannot see the annotation on the web page.
We should make good use of comments when writing code, because a complete HTML document often consists of hundreds or thousands of lines of code, and it may take a long time when we want to modify a certain part of it. Only then can you find the place you want to modify. With comments, it's different. We can divide the program into several parts according to functions or other conditions and mark them with comments. This can help you and others read your code and improve the readability of the code.
Single-line comments
In HTML you can use to add comments in the code,
The above is the detailed content of What are the html single line comment characters?. For more information, please follow other related articles on the PHP Chinese website!