Previous task
Text markup with HTML4/10
Back to the list of tasks
  1. 1. Paragraphs
  2. 2. Headings and subheadings
  3. 3. Unordered list
  4. 4. Ordered list
  5. 5. Multilevel list
  6. 6. Description List
  7. 7. Strong and b tags
  8. 8. Em and i tags
  9. 9. Line breaks and separators
  10. 10. Preformatted text
Nest task
  • Courses
  • Sign up
  • Log in

Loading...
It will be ready in a few seconds.

  • Theory
  • Theory

Ordered list

An ordered list is created using the <ol> tag, which can contain <li> tags within it.

If the elements of the unordered list are marked with bullets by default, the elements of the ordered list are numbered.

For an ordered list, you can specify a start attribute that changes the start of the numbering. For example, the code:

<ol start="3">
  <li>one</li>
  <li>two</li>
</ol>

Will lead to this result:

  1. one
  2. two
  • index.html
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Ordered list</title> </head> <body> <h1>What are the different types of headlines?</h1> <p>Heading and subheading tags in descending order of importance:</p> <ol> <li>h1</li> <li>h2</li> <li>h3</li> <!-- add items here --> </ol> <p>An ordered list is used to list objects or actions when order is important.</p> </body> </html>

The code has changed, click "Update" or enable autorun.

You have moved to another page

Click inside the mini-browser to highlight this window.

100%
GoalsCompleted
0
    1. Add three more items to the list of headings: h4, h5, h6.
    2. Then change the start of the list numbering using the start attribute so that it starts with the number 2 or greater.

    © 2023-2024, codehero.pro