Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre What is Semantic HTML? | Understanding Semantic HTML
Build Meaningful and Accessible Web Pages

bookWhat is Semantic HTML?

Semantic HTML refers to using HTML elements that communicate the meaning and structure of your content, rather than just its appearance. The purpose of semantic HTML is to make your web pages more understandable for both browsers and humans, including assistive technologies like screen readers. Semantic elements, such as header, nav, main, article, section, and footer, describe their intended role in the document. This helps search engines and accessibility tools interpret your content accurately.

In contrast, non-semantic elements like div and span do not provide any information about the type of content they contain—they are generic containers used primarily for styling or grouping content.

Using semantic elements improves code readability, maintainability, and accessibility. For example:

  • A nav element clearly indicates that its content is a navigation menu;
  • A div does not provide this context.

This distinction is especially important for users who rely on screen readers or other assistive devices, as semantic markup enables those tools to present the page structure and meaning more effectively.

non-semantic.html

non-semantic.html

semantic.html

semantic.html

copy

1. Which of the following elements are considered semantic HTML elements? Select all that apply.

2. When should you use a div instead of a semantic element?

question mark

Which of the following elements are considered semantic HTML elements? Select all that apply.

Select the correct answer

question mark

When should you use a div instead of a semantic element?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 1

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Awesome!

Completion rate improved to 8.33

bookWhat is Semantic HTML?

Glissez pour afficher le menu

Semantic HTML refers to using HTML elements that communicate the meaning and structure of your content, rather than just its appearance. The purpose of semantic HTML is to make your web pages more understandable for both browsers and humans, including assistive technologies like screen readers. Semantic elements, such as header, nav, main, article, section, and footer, describe their intended role in the document. This helps search engines and accessibility tools interpret your content accurately.

In contrast, non-semantic elements like div and span do not provide any information about the type of content they contain—they are generic containers used primarily for styling or grouping content.

Using semantic elements improves code readability, maintainability, and accessibility. For example:

  • A nav element clearly indicates that its content is a navigation menu;
  • A div does not provide this context.

This distinction is especially important for users who rely on screen readers or other assistive devices, as semantic markup enables those tools to present the page structure and meaning more effectively.

non-semantic.html

non-semantic.html

semantic.html

semantic.html

copy

1. Which of the following elements are considered semantic HTML elements? Select all that apply.

2. When should you use a div instead of a semantic element?

question mark

Which of the following elements are considered semantic HTML elements? Select all that apply.

Select the correct answer

question mark

When should you use a div instead of a semantic element?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 1
some-alt