Excited about diving deeper into HTML? Our focus today is structuring web content using HTML. In this lesson, we'll explore HTML lists, tables, and formatting tags. These elements organize and clarify your web pages, enhancing the user experience. Let's get started.
Lists offer an efficient presentation of organized information. HTML includes both unordered (with bullet points) and ordered (numbered) lists.
Often, we use unordered lists for text items of equal importance. The <ul>
tag signifies the list, and the <li>
tag encloses each item.
Consider this shopping list example:
This code produces a list with bullet points. Each bullet point introduces a new item, signifying an unordered list.
When sequence matters, like in instructions, we use ordered lists. The tag for ordered lists is <ol>
while <li>
is for the list items.
Here's an ordered list example representing a cooking recipe:
Executing this code results in numbered items — a perfect fit for step-by-step instructions.
