HTML Tutorial | Div Tag


The <div> element is a block-level element that is generally used as a container for other HTML elements.

  • A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).
  • Example of block level element:<p>,<h1>,<h2> etc.
  • <div> tag does not give any special appearance like <h1> tag, <h2> tag etc gives. It generally used as a container for HTML elements.
    Like if we want to change the color of 3 HTML elements together then we can use <div> tag to cover all HTML elements in one.
Example:
   <div style="color:blue">
   <h1>First item</h1>
   <h3>Second item</h3>
   <p>Third item</p>
   </div>
	   


Video-English
Best Use:360p or more (480p or 720p)



Video-Hindi
Best Use:360p or more (480p or 720p)