SwitchUp SwitchUp Ranked Best Coding Bootcamps 2025

Semantics of HTML

Written in HTML CSS Development
updated on 29 Nov 2024

HTML describes the content of your web page and provides meaning to each of the content. When you see a title and a paragraph on a web page, you understand visually that the creator meant for a title and a paragraph. But for visually impaired users who need to browse a website using a screen reader, they make sense of the content by relying on the semantic values the HTML elements hold. When I want to write a title, I can achieve it visually by either of these HTML.
language=>HTML <font style="font-size: 2em; font-weight: bold;">Title</font> <h1>Title</h1>

To a screen reader, the first title is created using a font element which just means it's text with specified styles. The second title created using the header 1 h1 element has the semantic value of the largest title.

Using the h1 element not only gives proper meaning to your title, but it's also shorter. Another reason for using appropriate semantic elements is because search engines like Google need to understand your website in order to rank you properly. Having good Semantic HTML usually improves your placement in search results, since it's easier for the search engine crawlers to understand.

Most of the HTML elements you use carry semantic values. If you want a quick overview of all the elements available, check out this reference list.

You can read more about HTML semantics on https://developer.mozilla.org/en-US/docs/Glossary/Semantics#semantics_in_html.

Trusted by

Students and instructors from world-class organizations

Join the upcoming Cohort #120

Enroll for December 7th, 2026