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

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

HTML 中的 HTML <h1> to <h6> 标签


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

定义与用法

The <h1> to <h6> tags define headers. <h1> defines the largest header. <h6> defines the smallest header.
从<h1>到<h6>都是用来定义标题的。<h1>定义的为最大的标题.<h6>为最小的标题


它们在HTML和XHTML中的区别

The "align" attribute of the h1 to h6 element was deprecated in HTML 4.01.
在HTML4.01中不推荐使用h1到h6元素中的"align"属性

The "align" attribute of the h1 to h6 element is not supported in XHTML 1.0 Strict DTD.
XHML1。0严密型的DTD不再支持h1到h6元素的"align"属性


实例

代码 输出结果
<h1>This is header 1</h1>
<h2>This is header 2</h2>
<h3>This is header 3</h3>
<h4>This is header 4</h4>
<h5>This is header 5</h5>
<h6>This is header 6</h6>

This is header 1

This is header 2

This is header 3

This is header 4

This is header 5
This is header 6

 


可选属性

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 left
center
right
justify
Specifies the alignment of the text in the header. Deprecated. Use styles instead
指定标题中的文字对齐。[不推荐]用样式来替代
TF

标准属性

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

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

事件属性

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

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


尝试与演示

Headings
Demonstrates the different headings in an HTML document.
在HTML文档中不同的标题

Center aligned heading
Demonstrates a center-aligned heading.
居中的标题

评论 (0) All

登陆 | 还没注册?