div tags | SoloLearn: Learn to code for FREE!


div tags

I have a doubt how or when and why should use div tags and how do use them in a website

8/4/2018 9:17:35 PM


4 Answers

New Answer


Think of the div tags as way to "section" your code


As Yahiko said, div tags are a way to "section" your website. You can use that to reference those different sections in your css styling afterwards or to perform certain tasks on a particular section with javascript. By using div tags it's like dividing your code into custom "sections" and giving them your own meaning.


Ooh ok thanks 😊


Same method one uses the tags in html is same way in php right