HTML 5 <br> 標(biāo)簽
定義和用法
<br> 標(biāo)簽插入簡單的換行符。
<br> 標(biāo)簽是一個(gè)空標(biāo)簽,意味著它沒有結(jié)束標(biāo)簽。所以這樣是錯(cuò)誤的:<br></br>
HTML 4.01 與 HTML 5 之間的差異
無。
例子:
This text contains<br />a line break
輸出:
This text contains a line break
屬性
標(biāo)準(zhǔn)屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請?jiān)L HTML 5 中標(biāo)準(zhǔn)屬性。
事件屬性
onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload
如需完整的描述,請?jiān)L HTML 5 中事件屬性。
TIY 實(shí)例
- 換行
- 本例演示如何在文檔中插入換行符。