CSS ऊंचाई गुण हमें किसी तत्व की ऊँचाई निर्दिष्ट करने में मदद करता है।
सिंटैक्स
CSS हाइट प्रॉपर्टी का सिंटैक्स इस प्रकार है -
Selector {
height: /*value*/
} उदाहरण
निम्नलिखित उदाहरण CSS ऊंचाई संपत्ति को दर्शाते हैं।
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
html, body {
margin: 0px;
height: 100vh;
}
div {
height: 100%;
text-align: center;
background: mistyrose;
}
</style>
</head>
<body>
<div>100% height!!</div>
</body>
</html> उदाहरण
यह निम्न आउटपुट देता है

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
html, body {
display: flex;
flex-direction: row;
justify-content: space-around;
margin: 0px;
height: 100vh;
box-shadow: inset 0 0 40px lightblue;
}
div {
width: 40%;
height: 100vh;
text-align: center;
box-shadow: inset 0 0 20px lightcoral;
}
</style>
</head>
<body>
<div>Watch This!</div>
<div>Let Me Show You How The Boss Does It!!</div>
<div>Open Up The Sky!!</div>
<div>GO! GO! GO!!</div>
</body>
</html> यह निम्न आउटपुट देता है
