HTML div Tag
In HTML <div> tag is used to wrap large section of HTML elements together. HTML div is a block element.
In HTML <div> tag is used to group HTML elements together and apply CSS styles to many elements in one time.
Example: If you have many paragraph elements into a div element then so you can easily apply CSS and set fonts etc to all paragraphs at one time instead of doing the same codes for each paragraph element.
<div style="border:1px solid pink;padding:20px;font-size:20px"> <p>Welcome to our html tutorioals. Keep continue to reading and learn html easily.</p> <p>This is an another paragraph for this example.</p> </div> |