当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <!--...-->标签

HTML
HTML Head
HTML Meta
HTML URLs
HTML Scripts
HTML 属性
HTML 事件
HTML URL-encode
HTML Web服务器
HTML 摘要
HTML 实例
标签列表
标准属性
事件属性
ASCII码
特殊字符
HTTP状态消息

HTML <!--...-->标签


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 450 ::
收藏到网摘: n/a

Definition and Usage
用法

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.
你还可以将特殊程序的信息放在注释里面。它们不会被用户看到,但它们对于程序来说还是有效的。给程序或是代码加上适当的注释是个好习惯。


Example
实例

Source
代码
Output
输出
<!--This text is a comment-->

<p>This is a regular paragraph</p>

This is a regular paragraph



Attributes: NONE
属性:无


Demos
演示

Hidden comments
How to insert a hidden comment in the source code.
怎样在源代码里加入注释

评论 (0) All

登陆 | 还没注册?