HTML Lists

HTML
<h4>Unordered list</h4>
<ul>
    <li>HTML</li>
    <li>CSS</li>
    <li>JavaScript</li>
</ul>

<h4>Ordered list</h4>
<ol type="1" start="1">
    <li>Install a code editor</li>
    <li>Create index.html</li>
    <li>Open it in a browser</li>
</ol>

<h4>Description list</h4>
<dl>
    <dt>HTML</dt><dd>Structure of a web page</dd>
    <dt>CSS</dt><dd>Presentation and layout</dd>
</dl>

Unordered list

  • HTML
  • CSS
  • JavaScript

Ordered list

  1. Install a code editor
  2. Create index.html
  3. Open it in a browser

Description list

HTML
Structure of a web page
CSS
Presentation and layout

Nested Lists

HTML
<ul>
    <li>Frontend
        <ul><li>HTML</li><li>CSS</li></ul>
    </li>
    <li>Backend
        <ul><li>Java</li><li>Python</li></ul>
    </li>
</ul>
  • Frontend
    • HTML
    • CSS
  • Backend
    • Java
    • Python

The type attribute of <ol> can be 1, A, a, I or i.

Track your progress through the HTML course