HTML Lists | Extraparse

HTML Lists

October 05, 20231 min read124 words

Understand how to create ordered and unordered lists in HTML to organize information effectively.

Table of Contents

Author: Extraparse

Lists

Lists are used to group related items in a structured manner. HTML offers two primary types of lists: unordered lists and ordered lists.

Unordered List

Used for items that do not follow a specific order. Created using the <ul> tag with <li> (list item) elements.

1<ul>
2 <li>Apple</li>
3 <li>Banana</li>
4 <li>Cherry</li>
5</ul>

Ordered List

Used for items that follow a specific sequence. Created using the <ol> tag with <li> elements.

1<ol>
2 <li>Step 1: Gather Ingredients</li>
3 <li>Step 2: Mix Ingredients</li>
4 <li>Step 3: Bake</li>
5</ol>

Nested Lists

You can create nested lists by placing a <ul> or <ol> inside a <li>.

1<ul>
2 <li>
3 Fruit
4 <ul>
5 <li>Apple</li>
6 <li>Banana</li>
7 </ul>
8 </li>
9 <li>
10 Vegetables
11 <ol>
12 <li>Carrot</li>
13 <li>Broccoli</li>
14 </ol>
15 </li>
16</ul>
xtelegramfacebooktiktoklinkedin
Author: Extraparse

Comments

You must be logged in to comment.

Loading comments...