国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > WEB開發 > 正文

HTML之清單標記

2024-04-27 13:54:55
字體:
來源:轉載
供稿:網友

■ 清單標記

<OL> <LI>
<UL>
<MENU> <DIR>
<DL> <DT> <DD>

  欲明白本篇【HTML徹底剖析】之標記分類,請看 【標記一覽】。
  也請先明白圍堵標記與空標記的分別,請看 【HTML概念】。

<OL> <LI> :

  <OL>稱為順序清單標記。<LI>則用以標示清單項目。
  所謂順序清單就是在每一項前加上 1,2,3... 等數字,又稱編號清單。

  <OL> 的參數設定(常用):
  例如: <ol type="i" start="4"></ol>

  • type="i"
    設定數目款式,其值有五種,請參考右表,默認為 type="1"。
  • start="4"
    設定開始數目,不論設定了哪一數目款式,其值只能是 1,2,3.. 等整數,默認為 start="1"。
TypeNumbering style
1arabic numbers1, 2, 3, ...
alower alphaa, b, c, ...
Aupper alphaA, B, C, ...
ilower romani, ii, iii, ...
Iupper romanI, II, III, ...

  <LI> 的參數設定(常用):
  例如: <li type="square" value="4">

  • type="square"
    只適用于非順序清單,設定符號款式,其值有三種,如下,默認為 type="disc":
    符號 是當 type="disc" 時的列項符號。
    符號 是當 type="circle" 時的列項符號。
    符號 是當 type="square" 時的列項符號。
  • value="4"
    只適用于順序清單,設定該一項的數目,其后各項將以此作為起始數目面遞增, 但前面各項則不受影響,其值只能是 1,2,3.. 等整數,沒有默認值。

例子:

HTML Source Code (原代碼)瀏覽器顯示結果
My best friends:
<ol>
<li>Michelle Wei
<li>Michael Wan
<li>Gloria Lam
</ol>
My best friends:
  1. Michelle Wei
  2. Michael Wan
  3. Gloria Lam

<UL> :

  <UL>稱為無序清單標記。
  所謂無序清單就是在每一項前面加上 等符號,故稱符號清單。

  <UL> 的參數設定(常用):
  例如: <UL type="square">

  • type="square"
    設定符號款式,其值有三種,如下,內定值為 type="disc":
    符號 是當 type="disc" 時的列項符號。
    符號 是當 type="circle" 時的列項符號。
    符號 是當 type="square" 時的列項符號。

注意:由于 <UL> 及 <LI> 都有 type 這個參數,兩者盡可能選其一。

例子:

HTML Source Code (原代碼)瀏覽器顯示結果
My Homepages:
<ul>
<li>Penpals Garden
<li>ICQ Garden
<li>Software City
<li>Creation of Webpage
</ul>
My Homepages:
  • Penpals Garden
  • ICQ Garden
  • Software City
  • Creation of Webpage

<MENU> <DIR> :

  這兩個標記不為 W3C 所贊同,希望使用者能以 <ul> 及 <ol> 代替。
  <MENU> 及 <DIR>,基本上它和 <ul> 是一樣的,在一些特別的瀏覽器可能表現出 <ol> 的效果,于舊版的 IE 或 NC 標記 <DIR> 不顯示符號或數目。兩標記的用法與 <ul> 完全一樣。

例子:

HTML Source Code (原代碼)瀏覽器顯示結果
My Homepages:
<dir>
<li>Penpals Garden
<li>ICQ Garden
<li>Software City
<li>Creation of Webpage
</dir>
My Homepages:
  • Penpals Garden
  • ICQ Garden
  • Software City
  • Creation of Webpage

  • <DL> <DT> <DD> :

      <DL>稱為定義清單標記。 <DT> 用以標記定義條目,<DD> 則用以標記定義內容。
    所謂定義清單就是一種分兩層的項目清單,其不帶有符號及數目。

      三個標記都沒有常用參數。而 <DT> <DD> 可以獨立使用,只是一些舊的瀏覽器不支持,如 IE 3.0。常用的如 <DD> 標記可用以制造段落第一個字前的空白。

    例子:

    原代碼<dl>
    <dt>How to use Definition List
    <dd>First, you should not place paragraph tag right after or before a list structure or between the items of a list. In cerntain contexts, use of extra paragraph tags should always be avoided, when you realize this concept, it is quit easy to write a HTML.
    <dt>Other things to know
    <dd>We usually put only ONE Definition tag following the Definition Term tag, more than one DD tag is not recommanded. Besides, unlike Definition List is a nonempty tag, both Definition Term and Definition Description are empty tags.
    </dl>
    顯示結果
    How to use Definition List
    First, you should not place paragraph tag right after or before a list structure or between the items of a list. In cerntain contexts, use of extra paragraph tags should always be avoided, when you realize this concept, it is quit easy to write a HTML.
    Other things to know
    We usually put only ONE Definition tag following the Definition Term tag, more than one DD tag is not recommanded. Besides, unlike Definition List is a nonempty tag, both Definition Term and Definition Description are empty tags.


    上一篇:HTML之影像地圖

    下一篇:HTML之特殊字符

    發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    學習交流
    熱門圖片

    新聞熱點

    疑難解答

    圖片精選

    網友關注

    主站蜘蛛池模板: 康乐县| 塘沽区| 平阴县| 阜阳市| 绥芬河市| 永修县| 兴文县| 翼城县| 都江堰市| 邢台市| 霍林郭勒市| 大冶市| 南部县| 安福县| 江都市| 周宁县| 宜昌市| 新余市| 丹寨县| 尼玛县| 呼伦贝尔市| 资溪县| 许昌市| 修文县| 黑水县| 岳普湖县| 华安县| 会泽县| 沁阳市| 新津县| 噶尔县| 定陶县| 永泰县| 静海县| 封丘县| 木兰县| 汕尾市| 江津市| 隆子县| 通城县| 贵州省|