r/learnwebdev • • Jan 13 '20

Question about "Div-itis"

So, I am learning HTML, CSS, and JavaScript first. I went through the HTML and CSS portions, and am currently on JS. However, I was curious about this "div-itis" I keep hearing about. I get what it is...and I get how to avoid it (kinda) What I am curious about it when to use it properly. In what situations would it be a good idea to use the <div>?

2 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/SushiNChill Jan 13 '20

These suggestions are mainly to help with readability and maintenance. Imagine an html file with all div tags and each of them has a class name that can be described by the proper html tag. I.e. <div class=header> can be replaced with <h2>, or something of that sort

To my knowledge, all webdevs should know html and css at the minimum with most jobs requiring JS now.