HTML5 <ul> 標(biāo)簽

2023-05-05 15:19 更新

定義和用法

<ul> 標(biāo)簽定義無(wú)序列表。

HTML 4.01 與 HTML 5 之間的差異

在 HTML 4.01 中,ul 元素的 "compact" 和 "type" 屬性是不被贊成使用的。在 HTML 5 中,不再支持這兩個(gè)屬性。

提示和注釋

提示:請(qǐng)使用 CSS 來(lái)定義列表的類型。

例子

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>編程獅</title> 
</head> 
<body>
<h4>無(wú)序列表:</h4>
<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>
</body>
</html>

屬性

標(biāo)準(zhǔn)屬性

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, 
lang, ref, registrationmark, tabindex, template, title

如需完整的描述,請(qǐng)?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

如需完整的描述,請(qǐng)?jiān)L問 HTML 5 中事件屬性。


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)