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

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

HTML <legend>标签


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

定义与用法

The legend element defines a caption for a fieldset.
legend元素可定义fieldset标题


在HTML和XHTML中的区别

The align attribute was deprecated in HTML 4.01.
在HTML4.01中它的align属性不推荐使用

The align attribute is not supported in XHTML 1.0 Strict DTD.
XHTML1.0严密型DTD不支持align属性。


实例

代码 输出结果
<fieldset>
<legend>Health information:</legend>
Height <input type="text" size="3" />
Weight <input type="text" size="3" />
</fieldset>
Health information: Height Weight


可选属性

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
下表中的DTD列指明了被支持的DTD属性。S=Strict(精确的),T=Transitional(传统的),F=Frameset(框架)

属性 描述 DTD
align top
bottom
left
right
Defines the alignment for contents in the fieldset. Top is default
定义fieldset中内容的对齐方式,默认为default
TF

标准属性

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.
查看完整的属性

事件属性

accesskey, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.
查看完整的属性


尝试与演示

Fieldset around data
How to draw a border with a caption around your data.
怎样让你的数据以带有标题的线框形式呈现出来

评论 (0) All

登陆 | 还没注册?