Web Analytics

Semantic HTML

Beginner ~6 min read

What is Semantic HTML?

Semantic HTML means using elements that clearly describe their meaning to both the browser and the developer.

Examples of non-semantic elements: <div> and <span> - Tells nothing about its content.

Examples of semantic elements: <form>, <table>, and <article> - Clearly defines its content.

Common Semantic Elements

  • <header> - Defines a header for a document or a section
  • <nav> - Defines a set of navigation links
  • <section> - Defines a section in a document
  • <article> - Defines an independent, self-contained content
  • <aside> - Defines content aside from the page content (like a sidebar)
  • <footer> - Defines a footer for a document or a section
HTML
CSS
JS

Quick Quiz

Which element is used to define a set of navigation links?

A
B
C
D
Congratulations! You have completed the HTML Tutorial. You now have a solid foundation in HTML.