What are Semantic Elements?
Semantic elements clearly describe their meaning in a human- and machine-readable way. These elements provide information about the type of content they contain, which helps with accessibility and SEO.
Common HTML Semantic Elements
Here are some common semantic elements in HTML:
<header>
: Represents a container for introductory content or navigational links.<nav>
: Defines a set of navigation links.<article>
: Represents a self-contained piece of content.<section>
: Groups related content together.<footer>
: Represents the footer of a document or section.<aside>
: Contains content that is tangentially related to the content around it.
Try It Yourself
Quiz: Test Your Knowledge
Which HTML element is best suited to contain navigation links?
Coding Challenge
Using the code editor above, create a page layout using the following semantic elements: <header>
, <nav>
, <section>
, <article>
, <aside>
, and <footer>
.