亚洲国产日韩欧美一区二区三区,精品亚洲国产成人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<dl>元素 (或HTML描述列表元素)是一個包含術語定義以及描述的列表,通常用于展示詞匯表或者元數(shù)據(jù) (鍵-值對列表)。

內容類別

流內容,如果<dl>元素的子元素包含一個名稱值組,則可觸及的內容。

允許的內容

零個或多個組,每個組由一個或多個<dt>元素,后跟一個或多個<dd>元素組成,可選地與<script>和<template>元素混合在一起?;颍ㄔ赪HATWG HTML中):一個或多個<div>元素,可選地與<script>和<template>元素混合在一起。

標記遺漏

沒有,起始和結束標簽都是強制性的。

允許的父母

任何接受流內容的元素。

允許ARIA角色

組,演示文稿

DOM界面

HTMLDListElement

屬性

該元素包含全局屬性。

示例

單條語句與描述

<dl>  <dt>Firefox</dt>  <dd>
    A free, open source, cross-platform,
    graphical web browser developed by the
    Mozilla Corporation and hundreds of
    volunteers.  </dd>  <!-- Other terms and descriptions --></dl>

輸出

多條語句,單條描述

<dl>  <dt>Firefox</dt>  <dt>Mozilla Firefox</dt>  <dt>Fx</dt>  <dd>
    A free, open source, cross-platform,
    graphical web browser developed by the
    Mozilla Corporation and hundreds of
    volunteers.  </dd>  <!-- Other terms and descriptions --></dl>

輸出:

單條語句,多條描述

<dl>  <dt>Firefox</dt>  <dd>
    A free, open source, cross-platform,
    graphical web browser developed by the
    Mozilla Corporation and hundreds of
    volunteers.  </dd>  <dd>
    The Red Panda also known as the Lesser
    Panda, Wah, Bear Cat or Firefox, is a
    mostly herbivorous mammal, slightly larger
    than a domestic cat (60 cm long).  </dd>  <!-- Other terms and descriptions --></dl>

輸出:

多條語句,多條描述

同樣的,該元素同樣可以支持在一個列表中出現(xiàn)多條語句以及多條描述。

元數(shù)據(jù)

描述列表可以很方便的將元數(shù)據(jù)展示為鍵-值對列表:

<dl>  <dt>Name</dt>    
  <dd>Godzilla</dd>  <dt>Born</dt>  <dd>1952</dd>  <dt>Birthplace</dt>  <dd>Japan</dd>  <dt>Color</dt>  <dd>Green</dd></dl>

小技巧:通過 CSS3 ,我們可以很容易的在術語后面添加一個與內容無關的分隔符號,比如:

dt::after {
  content: ": ";}

<div> 元素中包裝名稱值組

WHATWG HTML允許在 <div> 元素中的 <dl> 元素中包裝每個名稱 - 值組。當使用元數(shù)據(jù)時,或全局屬性適用于整個組或用于樣式時,這可能很有用。

<dl>  <div>    <dt>Name</dt>    <dd>Godzilla</dd>  </div>  <div>    <dt>Born</dt>    <dd>1952</dd>  </div>  <div>    <dt>Birthplace</dt>    <dd>Japan</dd>  </div>  <div>    <dt>Color</dt>    <dd>Green</dd>  </div></dl>

請不要將該元素(也不要用 <ul> 元素)用來在頁面創(chuàng)建具有縮進效果的內容。雖然這樣的結果樣式看上去沒問題,但是,這是很糟糕的做法,并且語義也不清晰。

要改變描述列表中描述的縮進量,請使用 CSSmargin 屬性。

規(guī)范

規(guī)范

狀態(tài)

評論

HTML生活標準該規(guī)范中'<dl>'的定義。

生活水平


HTML5該規(guī)范中'<dl>'的定義。

建議


HTML 4.01規(guī)范該規(guī)范中'<dl>'的定義。

建議

初始定義

瀏覽器兼容性

Feature

Chrome

Edge

Firefox

Internet Explorer

Opera

Safari

Basic Support

(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)

Previous article: Next article: