". This format has an exclamation mark in the start tag but not in the end tag; and the comment will not be displayed in the browser, but it can help record HTML documents. ."/> ". This format has an exclamation mark in the start tag but not in the end tag; and the comment will not be displayed in the browser, but it can help record HTML documents. .">

Home  >  Article  >  Web Front-end  >  What is the comment format of html

What is the comment format of html

藏色散人
藏色散人Original
2021-05-13 11:26:1513685browse

The comment format of

html is "0653885a7f43ecf0692f87a6b611cca8". This format has an exclamation mark in the start tag but not in the end tag; and the comment will not be displayed in the browser. Yes, but it can help record HTML documents.

What is the comment format of html

The operating environment of this article: windows7 system, HTML5&&CSS3 version, DELL G3 computer

html Comment tag format

Syntax format:0653885a7f43ecf0692f87a6b611cca8

Comment: There is an exclamation point in the opening tag, but not in the closing tag. The browser won't display comments, but they can help document your HTML document.

Note: The html comment tag does not support any standard attributes and events!

  • Single-line comments

<h1>html 注释标签的详细介绍</h1><!-- 文章标题-->

Instructions: You can tell from the comments that the title of the article is in front of it.

  • Multi-line comments

<!--
<p>这是文章的一个段落</p>
<p>这是文章的一个段落</p>
-->

Note: When there are bugs in the code, you can use comment tags to troubleshoot!

  • Conditional comments

<script type="text/javascript">
<!--
这是一段JavaScript代码
//-->
</script>

Explanation: Such conditional comments can prevent some browsers from not supporting JavaScript from displaying JavaScript code text in On the page, it affects the beauty!

Recommended study: "HTML Video Tutorial"

The above is the detailed content of What is the comment format of html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:what is htmlulNext article:what is htmlul