In intro to CSS chapter 1, why they used divs instead of sections as i learned in semantic html previous chapter ? that html considered not as semantic, right?

https://www.codecademy.com/paths/web-development/tracks/styling-a-website/modules/learn-css-selectors-visual-rules/lessons/css-setup-selectors/exercises/intro-to-css

You are absolutely right. As you get to know more and more code, you’ll realize that the use of <div> is widespread and predominant. In a perfect world when HTML5 introduced semantic tags every website and every developer would’ve adopted them right away. In practice, it is quite difficult, time consuming and even impractical to change entire codebases for it.

Bottom line: get used to seeing semantic and non-semantic HTML because it’s everywhere :sweat_smile:

4 Likes

Thanks for reply :blush:

Hello! I had the same question as @charleskhedia, and this answers most of it. I’m curious, though…if Codecademy is teaching semantic HTML as a best practice, which it seems to be, why don’t all lessons (such as Intro to CSS, chapter 1, as pointed out above) embrace it? If full adoption of HTML 5 is the ideal, one would think Codecademy would lead the way in teaching its students to use it for newly-authored code without exception. Thanks for your help.