Home > Web Front-end > Front-end Q&A > How to cancel the serial number of an ordered list in html

How to cancel the serial number of an ordered list in html

青灯夜游
Release: 2021-06-21 16:53:19
Original
3322 people have browsed it

In HTML, you can use the css list-style-type attribute to cancel the serial number of the ordered list. This attribute can set the type of the list item tag. You only need to set "list-style-type" to the ol tag element. :none;" style is enough.

How to cancel the serial number of an ordered list in html

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

Ordered list

An ordered list is a list of items, and the list items are marked with numbers.

The ordered list starts with the

    tag. Each list item begins with a
  1. tag.

    How to cancel the serial number of an ordered list in html

    Output:

    How to cancel the serial number of an ordered list in html

    Paragraphs, line breaks, pictures, links, other lists, etc. can be used inside the list items. .

    How to cancel the serial number of an ordered list in html?

    In html, you can use list-style-type:none; to cancel the serial number of the ordered list.

    list-style-type attribute sets the type of list item tag. When the value is set to "none", the tag can be removed.

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8"> 
    <style>
    ol.b {list-style-type:none;}
    </style>
    </head>
    
    <body>
    
    <p>有序列表实例:</p>
    
    <ol class="a">
      <li>Coffee</li>
      <li>Tea</li>
      <li>Coca Cola</li>
    </ol>
    
    <ol class="b">
      <li>Coffee</li>
      <li>Tea</li>
      <li>Coca Cola</li>
    </ol>
    
    </body>
    </html>
    Copy after login

    Output:

    How to cancel the serial number of an ordered list in html

    Recommended tutorials: "html video tutorial", "css video tutorial

The above is the detailed content of How to cancel the serial number of an ordered list in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template