Ordered List

An ordered list is used when the order of items is important. Items are numbered by default.

Example:

<ol>
    <li>Step 1: Preheat oven</li>
    <li>Step 2: Mix ingredients</li>
    <li>Step 3: Bake for 30 minutes</li>
</ol>
Changing Number Style (Type Attribute)

You can change the numbering style using the type attribute:

  • 1 (default) → type="1"
  • A (uppercase letters) → type="A"
  • a (lowercase letters) → type="a"
  • I (Roman numerals) → type="I"
  • i (small Roman numerals) → type="i"

Example:

<ol type="A">
    <li>Introduction</li>
    <li>Body</li>
    <li>Conclusion</li>
</ol>
Qus. 1 : Which of the following is used to create an ordered list in HTML?

  1. <ul>
  2. <ol>
  3. <pl>
  4. <hl>
Qus. 2 : How to specify individual items in an ordered list?

  1. LI
  2. UL
  3. OI
  4. None of the above
Qus. 3 : Which tag is used to create a numbered list in HTML?

  1. <ol>
  2. <ul>
  3. <li>
  4. <ll>
Qus. 4 : What is the correct way in which we can start an ordered list that has the numeric value count of 5?

  1. <ol type = “1” start = “5”>
  2. <ol type = “1” num = “5”>
  3. <ol type = “1” begin = “5”>
  4. <ol type = “1” initial = “5”>
Qus. 5 : What is the correct way in which we can start an ordered list that has the numeric value count of 5

  1. <ol type="1" start="5">
  2. <ol type = “1” num = “5”>
  3. <ol type="5" num="5">
  4. <ol type = “1” initial = “5”>

Programs

HTML code for creating the following output

View Solution


html code to design multiple list

View Solution


html code to design complex nested list

View Solution


Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad