QUIZ 1 QUIZ 2 ASSIGNMENTS  --- CONTENT ---   Introduction HTML Editors Basic HTML Tags Heading Tags Paragraph Tags Line Break Tag Horizontal Lines Preserve Formatting Links Images Formatting Tables Heading Colspan and Rowspan Backgrounds Height and Width Header, Body, and Footer Lists Unordered List UL Types Ordered List OL Types Div Span Forms Fieldset Legend Label Input Select Datalist Textarea

Lists

HTML offers web authors three ways for specifying lists of information. All lists must contain one or more list elements. Lists may contain − <ul> − An unordered list. This will list items using plain bullets. <ol> − An ordered list. This will use different schemes of numbers to list your items. <dl> − A definition list. This arranges your items in the same way as they are arranged in a dictionary.

Unordered Lists

An unordered list is a collection of related items that have no special order or sequence. This list is created by using HTML <ul> tag. Each item in the list is marked with a bullet.

For example:

    			          
<ul>
    <li>Beetroot</li>
    <li>Ginger</li>
    <li>Potato</li>
    <li>Radish</li>
</ul>
    		

Becomes:

  • Beetroot
  • Ginger
  • Potato
  • Radish


The type Attribute

You can use type attribute for <ul> tag to specify the type of bullet you like. By default, it is a disc. Following are the possible options −
<ul type = "square">
<ul type = "disc">
<ul type = "circle">

For Example:

    			
<ul type = "circle">
    <li>Beetroot</li>
    <li>Ginger</li>
    <li>Potato</li>
    <li>Radish</li>
</ul>
    		

Becomes:

  • Beetroot
  • Ginger
  • Potato
  • Radish


Ordered Lists

If you are required to put your items in a numbered list instead of bulleted, then HTML ordered list will be used. This list is created by using <ol> tag. The numbering starts at one and is incremented by one for each successive ordered list element tagged with <li>.

For Example:

    			
<ol>
    <li>Beetroot</li>
    <li>Ginger</li>
    <li>Potato</li>
    <li>Radish</li>
</ol>
    		

Becomes:

  1. Beetroot
  2. Ginger
  3. Potato
  4. Radish


The type Attribute

You can use type attribute for <ol> tag to specify the type of numbering you like. By default, it is a number. Following are the possible options −
<ol type = "1"> - Default-Case Numerals.
<ol type = "I"> - Upper-Case Numerals.
<ol type = "i"> - Lower-Case Numerals.
<ol type = "A"> - Upper-Case Letters.
<ol type = "a"> - Lower-Case Letters.

For Example:

    			
<ol type = "A">
    <li>Beetroot</li>
    <li>Ginger</li>
    <li>Potato</li>
    <li>Radish</li>
</ol>
    		

Becomes:

  1. Beetroot
  2. Ginger
  3. Potato
  4. Radish