亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" input type="datetime"-local input type="email" input type="file" input type="hidden" input type="image" input type="month" input type="number" input type="password" input type="radio" input type="range" input type="reset" input type="search" input type="submit" input type="tel" input type="text" input type="time" input type="url" input type="week" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
characters

HTML 的<li>元素用于在列表中表示的項(xiàng)。它必須包含在父元素中:有序列表(<ol>),無(wú)序列表(<ul>)或菜單(<menu>)。在菜單和無(wú)序列表中,列表項(xiàng)通常使用項(xiàng)目符號(hào)來(lái)顯示。在有序列表中,它們通常在左側(cè)以升序計(jì)數(shù)器顯示,如數(shù)字或字母。

內(nèi)容類別

無(wú)

允許的內(nèi)容

流量?jī)?nèi)容。

標(biāo)簽省略

如果列表項(xiàng)緊跟著另一個(gè)<li>元素,或者其父元素中沒(méi)有更多內(nèi)容,則可以省略結(jié)束標(biāo)記。

允許父母

一個(gè)<ul>,<ol>或<menu>元素。盡管不是一致的用法,但過(guò)時(shí)的<dir>也可以是父級(jí)。

允許的 ARIA 角色

menuitem,menuitemcheckbox,menuitemradio,選項(xiàng),演示文稿,收音機(jī),分隔符,選項(xiàng)卡,樹形結(jié)構(gòu)

DOM 接口

HTMLLIElement

屬性

該元素包含全局屬性。

value這個(gè)整數(shù)屬性表示由<ol>元素定義的列表項(xiàng)的當(dāng)前序號(hào)值。該屬性唯一允許的值是一個(gè)數(shù)字,即使該列表以羅馬數(shù)字或字母顯示。列出這一項(xiàng)后面的項(xiàng)目,繼續(xù)從值集編號(hào)。所述屬性具有用于無(wú)序列表(沒(méi)有意義<ul>)或菜單(<menu>)。

注意:此屬性在 HTML4中 已被棄用,但在 HTML5 中重新引入。

注意:在 Gecko 9.0 之前,負(fù)值被錯(cuò)誤地轉(zhuǎn)換為0.從 Gecko 9.0 開始,所有整數(shù)值都被正確解析。

type此字符屬性指示編號(hào)類型:

  • a: 小寫字母

  • A: 大寫字母

  • i:小寫的羅馬數(shù)字

  • I:大寫的羅馬數(shù)字

  • 1:數(shù)字

如果有的話,此類型將覆蓋其父元素<ol>所使用的類型。

用法說(shuō)明:此屬性已被棄用:list-style-type改為使用 CSS 屬性。

示例

<ol>    <li>first item</li>    <li>second item</li>    <li>third item</li></ol>

上面的 HTML 會(huì)輸出:

  1. 第一項(xiàng)

  2. 第二項(xiàng)

  3. 第三項(xiàng)

<ol type="I">    <li value="3">third item</li>    <li>fourth item</li>    <li>fifth item</li></ol>

上面的 HTML 會(huì)輸出:

  1. 第三項(xiàng)

  2. 第四項(xiàng)

  3. 第五項(xiàng)

<ul>    <li>first item</li>    <li>second item</li>    <li>third item</li></ul>
  • 第一項(xiàng)

  • 第二項(xiàng)

  • 第三項(xiàng)

有關(guān)更詳細(xì)的示例,請(qǐng)參閱 <ol> 和 <ul> 頁(yè)面。

規(guī)范

Specification

Status

Comment

HTML Living StandardThe definition of '<li>' in that specification.

Living Standard


HTML5The definition of '<li>' in that specification.

Recommendation


HTML 4.01 SpecificationThe definition of '<li>' in that specification.

Recommendation

The type attribute has been deprecated.

瀏覽器兼容性

Feature

Chrome

Edge

Firefox

Internet Explorer

Opera

Safari

Basic Support

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

value

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

type

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

Feature

Android

Chrome for Android

Edge mobile

Firefox for Android

IE mobile

Opera Android

iOS Safari

Basic Support

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

value

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

type

(Yes)

(Yes)

(Yes)

1

(Yes)

(Yes)

(Yes)

Previous article: Next article: