Important Notice:

Course Content
Float Property
0/1
Z-Index
0/1
CSS object-fit Property
0/1
CSS Visibility Property
0/1
CSS (Chapter 4) M2-R5.1
About Lesson

Width and Height of Elements

      किसी Element की Height और Width Declare करने के लिए CSS की width और height Property का इस्तेमाल किया जाता हैं। Height और Width केवल Content Area की होती हैं।

 

Width and Height of Elements

        The width and height properties of CSS are used to declare the height and width of an element. Height and Width are only of the Content Area.

 

Example:

<!DOCTYPE HTML>

<html>  

<head>    

 <title>Box Model Example</title>     

<style>        

div {           

background-color: lightgrey;           

width: 400px;           

border: 25px solid red;           

padding: 25px;           

margin: 25px;        

}     

</style>   </head>  

<body>     

<h2>Demonstrating the Box Model</h2>     

<p>Lorem Ipsum is simply dummy text of the printing and typesetting</p>     

<div>Lorem Ipsum is simply dummy text of the printing and       typesetting industry. Lorem Ipsum has been the industry’s standard dummy      text ever since the 1500s, when an unknown printer took a galley of      type and scrambled it to make a type specimen book..</div>  

</body>

</html>

 

error: Content is protected !!