To create a numbered list in HTML, you use the <ol> (Ordered List) element. Inside the <ol> element, you use <li> (List Item) elements to define each item in the list. Here,
<ol> represents the ordered list container.
<li> represents each list item.
Syntax
<ol> <li>First item</li> <li>Second item</li> <li>Third item</li> </ol>
Example: Implementation to create a numbering list in HTML.
HTML
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport"
content = "width=device-width, initial-scale=1.0" >
< title >Numbering</ title >
</ head >
< body >
< ol >
< li >First item</ li >
< li >Second item</ li >
< li >Third item</ li >
</ ol >
</ body >
</ html >
|
Output:

|