CSS height


Height property in CSS is used to set Height of HTML element in web page.
    Syntax:
  • height:value;

CSS width


Width property in CSS is used to set width of HTML document while display in web page.
    Syntax:
  • width:value;

Example:

<!DOCTYPE html>
<html>
<head>
<style>
div{
height:100px;
width:500px;
border:1px solid green;
}
</style>
<title>
CSS HEIGHT AND WIDTH
</title>
</head>
<body>
<div>KOLKATA is capital of West Bengal.Located in eastern part of country this Kolkata enjoys almost all flavours of climate.Kolkata is also known as City of Joy.</div>
</body>
</html>

Output:

KOLKATA is capital of West Bengal.Located in eastern part of country this Kolkata enjoys almost all flavours of climate.Kolkata is also known as City of Joy.