HTML Lists
HTML lists are used to group related items together. There are three types of lists:
- Ordered List: Uses the
<ol>
tag and displays items in a numbered sequence. - Unordered List: Uses the
<ul>
tag and displays items with bullet points. - Definition List: Uses the
<dl>
,<dt>
, and<dd>
tags to display items with descriptions.
Example:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
HTML Tables
HTML tables are used to display data in a structured format. A table is created using the <table>
tag along with <tr>
(table row), <th>
(table header), and <td>
(table data) tags.
Example:
<table>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
</tr>
</table>
Try It Yourself
Quiz: Test Your Knowledge
Which HTML tag is used to define a table row?
Coding Challenge
Create an ordered list of your top 3 favorite programming languages, and then create a table with 2 columns: "Language" and "Years of Experience" for each language.