Need more explanation about div tags

Hello coders! I need some of your thoughts about div tags on the html as I’m new to this language. So in my understanding, by using div tags we can style our text, object or whatever we put in our elements on the html, we can wrap them to make a container and style them whatever we desire. How about if we style the elements itself like section, body, header etc., by making them as a selector or putting attributes like class and id to put some margins, padding or spaces and color them. So why we still need to use div tags? Thank you!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.