HTML基礎 ol type 序號為 數字 羅馬數字 字母的有序列表


             OS : Windows 10
        browser : Chrome 83.0.4103.116
         editor : Visual Studio Code 1.46.1       
    typesetting : Markdown

html

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 羅馬數字 -->
    <ol type="I">
        <li>仁</li>
        <li>義</li>
        <li>禮</li>
        <li>智</li>
        <li>信</li>
    </ol>

    <br />

    <!-- 字母 -->
    <ol type="a">
        <li>儉</li>
        <li>慈</li>
        <li>不敢為天下先</li>
        <!--當把type設置為x的時候,出現錯誤。使用數字序號-->
    </ol>

    <br />

    <!-- 數字 -->
    <ol>
        <li>仁</li>
        <li>義</li>
        <li>禮</li>
        <li>智</li>
        <li>信</li>
    </ol>

    <!--
        ol,li 屬性
              type:編號類型
                   a
                   A
                   i  羅馬小寫
                   I  羅馬大寫
                   1
              start:從第幾個開始編號(不是從第幾)
                   值為數字        
    -->

</body>

</html>

result

resource

  • [ 教程 ] www.w3school.com.cn/html/index.asp
  • [ 手冊 ] www.w3cschool.cn/html5_reference.html
  • [ 規范 ] www.runoob.com/html/html5-syntax.html
  • [ 平台 ] www.cnblogs.com
  • [ 規范-參考 ] www.w3cschool.cn/wematy
  • [ 統計-參考 ] tongji.baidu.com/research/site#browser


感恩曾經幫助過 客名利 的人。
html,xhtml和html5的發展歷史及其特性,建議學習。
代碼的書寫是有規范的,適當地遵守規范,助人助己。
Chromium和Firefox是開源瀏覽器,新功能眾多,建議關注。
Blink,EdgeHTML,Gecko,KHTML,Trident,WebCore,WebKit等,空閑時可以了解一下。
不同的瀏覽器解析代碼是有差別的,要多關注兼容性問題。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM