Every HTML tag has a meaning to it. Few examples below,
- <p> – is meant to show paragraphs
- <span> – is used to show inline text
- <div> – used to contain other content.
- <header> – is used to create the header part of your website.
- <footer> – is used to create the footer
And so on. It’s not that you just create a web page with all divs or tables :). Your web page needs to be semantic and that is why we call it the semantic web.
Why use proper tags?
- Semantic tags make it clear to the browser what the meaning of a page and its content is.
- That clarity is also communicated with search engines, ensuring that the right pages are delivered for the right queries.
- It helps with the accessibility of your web page. Simply saying a person who is blind can read your page better by using screen readers.