Types of HTML lists

(*-*)浩
Release: 2019-09-10 16:35:40
Original
3225 people have browsed it

HTML supports ordered, unordered and defined lists

Types of HTML lists

##Unordered list

An unordered list is a list of items marked with bold dots (typically small black circles).

Unordered list starts with
    tag. Each list item begins with
  • . (Recommended learning:

    HTML Introduction Tutorial)

    <ul>
    <li>Coffee</li>
    <li>Milk</li>
    </ul>
    Copy after login

    The browser displays as follows:

    CoffeeMilk
    Copy after login
    Copy after login

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

    Ordered list

    Similarly, an ordered list is also 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.

      <ol>
      <li>Coffee</li>
      <li>Milk</li>
      </ol>
      Copy after login

      The browser displays as follows:

      CoffeeMilk
      Copy after login
      Copy after login

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

      Define List

      A custom list is not just a list of items, but a combination of items and their comments.

      Custom lists start with a
      tag. Each custom list item begins with
      . The definition of each custom list item begins with
      .

      <dl>
      <dt>Coffee</dt>
      <dd>Black hot drink</dd>
      <dt>Milk</dt>
      <dd>White cold drink</dd>
      </dl>
      Copy after login

      The browser displays as follows:

      Coffee
      Black hot drink
      Milk
      White cold drink
      Copy after login

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

      The above is the detailed content of Types of HTML lists. 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