The effect of using semantic HTML elements on a web page

Hey,

I note that there are a select number of semantic HTML elements that should be used in place of other elements, for example, replacing <div id="header"> </div> with <header> </header> to make the code easier on the eye.

I am therefore wondering if this has any effect in the background on how this would be processed. I can, of course, see that this doesn’t change anything on the front end.

Richard.

3 Likes

Hey Richard, welcome to the community!

I’ll refer you to these answers:

So basically:

  • Makes code easier to maintain
  • Important to screen readers
  • Helps crawlers better understand the structure of the page (important for SEO)

Well-structured code that validates is therefore important. There are some rules to respect, and you can always check the markup validity of your HTML code right here: https://validator.w3.org/

Hope this helps, and happy coding

4 Likes

Thank you for clearing this up :slight_smile:.

2 Likes