HTML Code In CSS Tutorial Examples Not Semantic | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

HTML Code In CSS Tutorial Examples Not Semantic

I've noticed that none of the code in the examples or code repos in the CSS tutorial is semantic. There are lots of <div> tags used but no <section> & <article> tags like we were told to use in the HTML5 tutorial. Can someone explain why this is?

8th Dec 2022, 7:57 PM
Peter Cotterell
Peter Cotterell - avatar
3 Answers
+ 2
In my opinion they use div to make tutorial easier to follow. So we can focus on topic. In practice we use semantic elements on our web pages, because they are important for SEO
8th Dec 2022, 11:58 PM
PanicS
PanicS - avatar
+ 1
PanicS Semantic elements are also important for code readability. Div blocks are not so easy to understand with a larger amount of code
9th Dec 2022, 6:57 AM
Knight
Knight - avatar
0
Because they didn't.
8th Dec 2022, 8:48 PM
Knight
Knight - avatar