网络学院 w3pop社区 网络资源 IT新闻

w3pop.com :: 网络学院 :: HTML :: HTML <br>标签

会员登陆

帐号

密码

回答

记住密码

忘记密码? 注册

HTML <br>标签


作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 浏览:3212 :: ::

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