What sounds self-evident is by no means always self-evident on websites. Because for almost every element of a website, there are different ways to implement it technically.
Semantic HTML ensures that the source code doesn't just say how something is displayed, but also what it means.
This helps people using assistive technologies, search engines, and increasingly automated systems understand a website better.
What does "semantic" mean?
Put simply, semantics means: meaning.
HTML provides numerous elements whose meaning is already clearly defined.
For example:
<h1>TYPO3 Agency Frankfurt</h1>
<nav>
...
</nav>
<main>
...
</main>
<footer>
...
</footer>
From this, a browser can recognize:
<h1>is the page's main heading,<nav>contains a navigation,<main>contains the main content, and<footer>marks the footer area.
This information exists independently of how the individual areas are later styled with CSS.
A website can look identical yet be technically completely different
This can be shown especially well with a button.
You could, for example, code a clickable area like this:
<div class="button" onclick="openMenu()">
Menu
</div>
With CSS, this element can easily be made to look like a button.
Technically, though, it's initially just a <div> – a generic container without the meaning "button".
Better is:
<button>Menu</button>
To a sighted visitor, both variants can look nearly identical. For the browser, however, there's a crucial difference.
With the second variant, it's unambiguous:
This is a button.
The browser also already knows important properties of a button, such as its behavior under keyboard operation.