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

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

HTML <br>标签


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

Definition and Usage
用法

The <br> tag inserts a single line break.
<br>标签可以插入一单独的换行

The <br> tag is an empty tag (means that it has no end tag - the following is wrong: <br></br>).
<br>标签是一个空标签(这意味着它并没有结束标签 - 这样是错误的:<br></br>)


Differences Between HTML and XHTML
在HTML和XHML中的区别

In HTML the <br> tag has no end tag.
在HTML中<br>不需要结束标签

In XHTML the <br> tag must be properly closed, like this: <br />.
在XHTML中<br>标签必须使用合理的关闭,像这样:<br />


Tips and Notes
注意点

Note: Use the <br> tag to enter blank lines, not to separate paragraphs.
可以使用<br>标签来加入空行,但别用空段落


Example
实例

源代码 输出结果

This text contains<br />a line break

This text contains
a line break



Standard Attributes
标准属性

id, class, title, style

For a full description, go to Standard Attributes.
查看完整的描述


Try-It-Yourself Demos
尝试

Line breaks
How to insert line breaks in an HTML document.
给HTML文档加上换行

评论 (0) All

登陆 | 还没注册?