CSS Height Property

In this chapter you will learn:
About height property
Example of height property
CSS height property is a common property of css which is used by many elements or tags to set the height. You can use this property to set the height of image, paragrapg, division etc and make your website attractive and impressive.
Syntax:
height:value;
Example of this property:
<html>
<head>
    <title>Example of height property</title>
    <style type="text/css">
  img
  {
      height:100px;/* height property */
  }
  p
  {
      background-color:cyan;
      height:30px;/* height property */
  }
  div
  {
      background-color:Blue;
      height:70px;/* height property */
  }
</style>
</head>
<body>
<img src="css-icon.jpg" alt= "image of css icon"/>
<p> This is the example of height property</p>
<div> This is the example of height property</div>
</body>
</html>

Output:- example of height property

Summary

In this chapter, you have learned about height property and a program is also given to you better guide so try it yourself and click on Next button to continue-

More Articles

 

Share your thought



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.