HTML Tutorial Part 5
HTML Lists and Tables with Interactive Quiz
HTML Lists
HTML provides three types of lists: ordered lists, unordered lists, and description lists.
1. Unordered Lists (Bullet Points)
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
2. Ordered Lists (Numbered)
<ol>
<li>First step</li>
<li>Second step</li>
<li>Third step</li>
</ol>
<li>First step</li>
<li>Second step</li>
<li>Third step</li>
</ol>
3. Description Lists
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
</dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
</dl>
HTML Tables
Tables organize data into rows and columns using <table>, <tr>, <th>, and <td> tags.
<table>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
<td>New York</td>
</tr>
</table>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
<td>New York</td>
</tr>
</table>
Example Table
| Product | Price | Stock |
|---|---|---|
| Laptop | $999 | 15 |
| Mouse | $25 | 50 |
| Keyboard | $75 | 30 |
Interactive Quiz
Question 1: Which tag creates an unordered list?
A) <ol>
B) <ul>
C) <li>
D) <list>
Question 2: What does <th> stand for in tables?
A) Table Height
B) Table Header
C) Table HTML
D) Table Holder
Question 3: Which tag represents a table row?
A) <td>
B) <tr>
C) <table>
D) <row>
Fantastic!
You've completed Part 5 of the HTML Tutorial!
Next up: HTML Forms with Live Code Editor
0 Comments