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

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

HTML <p>标签


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

定义与用法

The <p> tag defines a paragraph.
<p>标签可定义一段落


在HTML和XHTML中的区别

All "presentation attributes" of the p element were deprecated in HTML 4.01.
在HTML4.01里任何与p元素有关的"一般性属性"都不再推荐使用

All "presentation attributes" of the p element are not supported in XHTML 1.0 Strict DTD.
XHTML1.0严密型DTD已经不再支持与p元素有关的任何"一般性属性"


实例

代码 输出结果
<p>This is some text in a very short paragraph</p>

This is some text in a very short paragraph



可选属性

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
right
center
justify
Specifies the alignment of the text within the paragraph. 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.
查看完整的属性


尝试与演示

Simple paragraphs
How paragraph elements are displayed in the browser.
如何在浏览器中显示段落

More paragraphs
Some of the default behaviors of paragraph elements.
多个段落

Poem problems
Some problems with HTML formatting.
一些HTML格式化上问题

评论 (0) All

登陆 | 还没注册?