Div



Html <div> Element


The <div> tag is nothing more than a container unit that encapsulates other page elements and divides the Html document into sections. Web developers use <div> elements to group together Html elements.





<div> example

<div name="thisdiv" title="Example of div element">


 <h1>Heading</p>


 <p>This a paragraph</p>


</div>









Html <div> inside <div>


The <div> inside <div> elements helps to create subdivide to create different kind of layout in a web document. This concept is the foundation of which most web pages are now built. Html documents that are properly divided and subdivided are easy to maintain and modify.





<div> example

<div name="maindiv" title="Example of maindiv element">


 <div name="subdiv" title="Example of subdiv element">


   <h1>Heading</p>


   <p>This a paragraph</p>


 </div>




 <div name="subdiv" title="Example of subdiv element">


   <h1>Heading</p>


   <p>This a paragraph</p>


 </div>


</div>







Comments (0)

  • To add your comment please or

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.

Got It!