当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <!--...-->标签
The comment tag is used to insert a comment in the source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.
注释标签可以在源代码里插入一些对代码的注释。这些注释会被浏览器所忽略。以后再次编辑代码的时候这些注释会给你带来方便。
You can also store program-specific information inside comments. In this case they will not be visible for the user, but they are still available to the program. A good practice is to comment the text inside the script and style elements to prevent older browsers, that do not support scripting or styles, from showing it as plain text.
你还可以将特殊程序的信息放在注释里面。它们不会被用户看到,但它们对于程序来说还是有效的。给程序或是代码加上适当的注释是个好习惯。
Source 代码 | Output 输出 |
---|---|
<!--This text is a comment--> <p>This is a regular paragraph</p> | This is a regular paragraph |
Attributes: NONE
属性:无
Hidden comments
How to insert a hidden comment in the source code.
怎样在源代码里加入注释