Basic HTML
Lists in HTML
Unordered Lists (<ul>
)
An unordered list is a collection of items without a specific order. In HTML, the <ul>
tag is used along with the <li>
tag for each list item. These lists are typically represented with bullets on the page.
html
Ordered Lists (<ol>
)
Unlike unordered lists, ordered lists use numbers or letters to indicate the order of items. To create an ordered list, we use the <ol>
tag.
html
List Items (<li>
)
The <li>
tags are used within the list tags (<ul>
or <ol>
) to define each individual list item. Lists can contain text, links, and even other lists.
html
Description Lists (<dl>
, <dt>
, <dd>
)
Description lists are useful for defining terms and descriptions. We use the <dl>
tag to start the list, <dt>
for each term, and <dd>
for its description.
html
Grouping Elements (<div>
and <span>
)
In HTML, the <div>
and <span>
tags are used for grouping and styling other elements. <div>
is a block-level container, ideal for grouping entire sections. On the other hand, <span>
is an inline container, used to apply styles to parts of text.
html
Chapter Conclusion
Now that you understand how to use lists and grouping elements, you can structure the content of your web pages in a clear and organized manner. In the next chapter, we will learn about links and navigation in HTML.
- Introduction to HTML
- Text Elements in HTML
- Lists in HTML
- Links and Navigation
- Images and Multimedia Content
- Tables in HTML
- Forms in HTML
- HTML Head and Metadata
- Semantic HTML
- HTML5 APIs and Advanced Elements
- iFrames and HTML Embeddings
- Data Representation with HTML
- Accessibility in HTML
- Best Practices for HTML
- HTML and SEO
- HTML for Responsive and Mobile Design
- Integration of HTML with JavaScript
- Creating a Simple Website