HTML language profiling 6: list tag

Source: Internet
Author: User
Tags arabic numbers use definition
HTML language analysis-6 ▲ Top

6. list tag

<OL> <LI>
<UL>
<MENU> <DIR>
<DL> <DT> <DD>
■ <OL> <LI>: ▲Top
<OL> it is called a sequential list tag. <LI> indicates the configuration items.
The order list is to add the numbers 1, 2, 3... and so on before each item, also known as the number list.

<OL> parameter settings (commonly used ):
Example: <ol type = "I" start = "4"> </ol>

  • Type = "I"
    Set the number of styles. There are five values. For details, refer to the right table and set it to type = "1 ".
  • Start = "4"
    Set the start number. No matter which type is set, the value can only be an integer of 1, 2, 3, and so on. The value is set to start = "1 ".
Type Numbering style
1 Arabic numbers 1, 2, 3 ,...
A Lower alpha A, B, C ,...
A Upper alpha A, B, C ,...
I Lower Roman I, II, III ,...
I Upper Roman I, II, III ,...

<LI> parameter settings (commonly used ):
For example: <li type = "square" value = "4">

  • Type = "square"
    It is applicable only to the non-sequential list and has three types of Character styles. The values are set to type = "disc" as follows ":
    The column symbol is used when type = "disc.
    If "width = 10 height = 10 border = 0> is the column entry symbol when type =" circle.
    Symbol is the column entry symbol when type = "square.
  • Value = "4"
    This parameter is only applicable to the sequential list. It sets the number of this item. Subsequent items increase progressively as the starting number, but the previous items are not affected. The value can only be 1, 2, 3 .. and has no internal value.

Example:

HTML Source Code) Browser display result
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>: ▲Top
<UL> it is called an unordered list tag.
The unordered list is to add, and other symbols before each item, so it is also called the symbol list.

<UL> parameter settings (commonly used ):
Example: <UL type = "square">

  • Type = "square"
    Set the symbol style. The values are as follows ":
    The column symbol is used when type = "disc.
    The column symbol when type = "circle.
    Symbol is the column entry symbol when type = "square.

Note: because both <UL> and <LI> have the type parameter, use either of them as much as possible.

Example:

HTML Source Code) Browser display result
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>: ▲Top
These two tags are not accepted by W3C. We hope that the user can replace them with <ul> and <ol>.
<MENU> and <DIR>, which are basically the same as <ul>, may show <ol> effects in some special browsers, in earlier versions, the IE or NC flag <DIR> does not display symbols or numbers. The usage of the two tags is exactly the same as that of <ul>.

Example:

HTML Source Code) Browser display result
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>: ▲Top
    <DL> it is called the definition list tag. <DT> identifies the definition entry, and <DD> identifies the definition content.
    The so-called definition list is a two-layer project list with unique symbols and numbers.

    None of the three tags have common parameters. <DT> <DD> can be used independently, but some old browsers are not supported, such as IE 3.0. For example, the <DD> mark can be used to create a blank before the first word of a paragraph.

    Example:

    Original code <Dl>
    <Dt> How to use Definition List
    <Dd> First, you shocould 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 shoshould 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>
    Display result
    How to use definition list
    First, you shoshould 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 shoshould 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.

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.