What is <div> | Sololearn: Learn to code for FREE!


What is <div>

8/29/2017 12:50:06 PM

Ansh Gupta

3 Answers

New Answer


The <div> tag defines a division or a section in an HTML document. The <div> tag is used to group block-elements to format them with CSS.


<divstyle="color:#0000FF">   <h3>This is a heading</h3>   <p>This is a paragraph.</p> </div>


It's a "block" of content in HTML, you use it to structure your page but since HTML5, you can use more reavelant name such as <aside> <footer> <header> <article> your code is more readable this way.