HTML學習-list

 

1.list有分<ol>編號排序<ul>不編號排序

格式如下

  1. The first list item
  2. The second list item
  3. The third list item
  • List item
  • List item
  • List item
HTML Unordered Lists
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>
 
HTML Ordered Lists
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>
 
2.Nested list
  • Coffee
  • Tea
    • Black tea
    • Green tea
  • Milk
<ul>
  <li>Coffee</li>
  <li>Tea
    <ul>
    <li>Black tea</li>
    <li>Green tea</li>
    </ul>
  </li>
  <li>Milk</li>
</ul>
 
3.另外還有HTML Description Lists(不常用不詳提)
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>