+ 3
is <div> overused?
I've seen a lot of people using the <div> tag instead of <header>, <main>, <footer> etc. could this cause a problem with the final product? (ceo, etc)
6 ответов
+ 7
Jose
The early part of the HTML course teaches div, which is why many Sololearn users, myself included, employ it in their example codes.
Most of these codes don't require headers, main, footer, articles sections and asides.
Lesson 9.1 of the Sololearn Web Development course state the following regarding the use of block elements other than div.
"It is important to create a correct structure for the page, because search engines and screen readers use it to read the content of the page and understand its structure."
+ 6
I asked once the same question and i got an answer which is that most programmers likes the div because it gives the ability to name it the name that they like and the treatment get much easier than the header and the other tags
+ 5
Good question. I'm a beginner in Web Development and I myself like div(and span sometimes) to be the better option than header or nav tags. I'm just using IDs and classes to identify elements, so i feel pointless to use header or main instead of div tag. For now I don't need it. But it's very much needed once we go into the real development.
"I've seen a lot of people using the <div> tag instead of..."
Maybe you only referred the Sololearn application. Refer the source codes of websites that come up on Google search. Maybe then you'll change your opinion
+ 4
Header, main, footer and things like that mean nothing other than helping with SEO (search engine optimization) since here on sololearn you won't need to put in account CEO thus div is a bit easier to remember for early students and makes small code snippits more understandable
+ 3
Mhmd - MC exactly👌🙌💯
+ 1
Yes, it will make the site unreadable to some bot.