Tuesday 31 January 2023

HTML DIV Tag

 

HTML DIVISION TAG

========================================================================= 

 

The <div> tag is an empty container that is used to define a division or a section. It does not affect the content or layout and is used to group HTML elements to be styled with CSS or manipulated with scripts.

 ===================================================

  1. The <div> tag defines a division or a section in an HTML document.
  2. The <div> tag is used as a container for HTML elements - which is then styled with CSS or manipulated with JavaScript.
  3. The <div> tag is easily styled by using the class or id attribute.
  4. Any sort of content can be put inside the <div> tag! 


********************************************************************************

Code:- 

=====================================================================

<html>

<head>

<style>

.mydiv

{

border:8px outset red;

background-color:EA9A0D;

text-align:center;

}

.mydiv1

{

border:10px outset 0DD9EA;

background-color:0D57EA;

text-align:left;

}

</style>

</head>


<body>


<div class="mydiv">

<h1> HTML  (division tag) <Div> Tag</h1>

<p> The <div> tag is an empty container that is used to define a division or a section. 

It does not affect the content or layout and is used to group 

HTML elements to be styled with CSS or manipulated with scripts.</p>

<hr>

<img src="pexels-markus-spiske-1089440.jpg" width="800" height="600">

</div>

<hr>

<hr>

<br>

<div class="mydiv1">

<h2> division tag Tag</h2>

<p> 

<p>The <div> tag defines a division or a section in an HTML document.<p>

<p>The  tag is used as a container for HTML elements - which is then styled with CSS or manipulated with JavaScript.

The tag is easily styled by using the class or id attribute.

Any sort of content can be put inside the tag! </p>

<hr>

<img src="pexels-thisisengineering-3913025.jpg" width="800" height="600">

</div>

</body>

</html>

************************************************************************

Output


*************************************************************************

No comments:

Post a Comment