[HTML] 清單 ul 與 ol 與dl 差異

KouWei.Lee
2 min readSep 2, 2020

--

Photo by Florian Olivo on Unsplash

<ul>無序列表 (unordered lists)

ul為無序清單也就是項目清單

<ul>
<li>星期一</li>
<li>星期二</li>
</ul>

輸出為

  • 星期一
  • 星期二

<ol> 有序列表 (ordered lists)

ol為有序清單也就是序號清單

<ol>
<li>星期一</li>
<li>星期二</li>
</ul>

輸出為

  1. 星期一
  2. 星期二

<dl>定義列表 (definition lists)

dl定義清單可以製造出縮排效果

<dl>
<dt>項目標題一</dt>
<dd>這裡是項目敘述一 ...</dd>
<dt>項目標題二</dt>
<dd>這裡是項目敘述二 ...</dd>
</dl>

輸出為

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response