In "CSS An Overview" why are we still using div ids for things that we now have semantic elements for in html5? Is this just to insure comparability with old sites? Will we be learning the html5 elements later to replace the divs?
on stack overflow Adesh M says:
Semantic elements means Elements with meaning. These elements clearly describes its meaning to both browser as well as to the developer.and are examples of non-semantic elements; they don't tell anything about their content, whereas elements like ,
, and clearly define their content and are therefore referred to as semantic elements. - header is a semantic element that specifies a header for a document or section. headers should be used as containers for introductory contents. You can have several header elements in one document. - section is a thematic grouping of content, typically with a heading. - article specifies independent, self-contained content.
and so on...
W3 schools also says:
HTML5 semantic elements are supported in all modern browsers.
In addition, you can "teach" older browsers how to handle "unknown elements".
So why is codecademy teaching old methods?