Basic HTML
Semantic HTML
Introduction to Semantic Elements
Semantic HTML refers to the use of tags that clearly describe the purpose of the elements in a web page. This helps search engines and assistive devices better understand the structure and content of the page, improving accessibility and search engine optimization.
Sections and Articles (<header>
, <footer>
, <section>
, <article>
)
Some of the most common semantic tags are <header>
and <footer>
for headers and footers, <section>
to group content thematically, and <article>
for standalone content.
html
Aside, Nav, and Main Elements (<aside>
, <nav>
, <main>
)
Other important tags include <aside>
for related content, <nav>
for navigation, and <main>
for the main content of the page. These tags enhance the organization and navigation of the site.
html
Accessibility with Semantic HTML
The use of semantic HTML contributes to accessibility, allowing assistive devices, such as screen readers, to interpret and navigate the content efficiently. This also benefits users with disabilities, as semantic elements make the page structure clearer.
For example, a screen reader identifies the <nav>
tag as a navigation area, allowing the user to jump directly to the menu instead of reading all the content.
Chapter Closure
You now understand how semantic elements can improve the accessibility and organization of your web pages. In the next chapter, we will learn about HTML5 APIs and other advanced elements that enrich content functionality.
- 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