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

HTML
HTML 介绍
HTML 元素
HTML 基本标签
HTML 格式
HTML 实体字符
HTML 链接
HTML 框架
HTML 表格
HTML 列表
HTML 表单
HTML 图片
HTML 背景
HTML 颜色
HTML 颜色值
HTML 颜色名
HTML 便条
HTML 布局
HTML 字体
HTML 4.0
HTML 样式

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 429 ::
收藏到网摘: 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

登陆 | 还没注册?