To change height of Div using CSS, you can set the height
style property for the div elements with the values like 100px
, 200px
, 300px
, etc.
The following is the typical CSS code to change height of Div in HTML page using tag name div
.
div {
height: 100px;
}
div {
height: 200px;
}
div {
height: 300px;
}
We shall go through some working examples on how to change height of Div using CSS. In the following examples, you may change the value of height and Run the code to visually observe the changes made to the Div elements.
This is an example on how to change height of Div using height of 100px .
You may edit the following code, and click on Run button.
This is an example on how to change height of Div using height of 200px.
You may edit the following code, and click on Run button.
This is an example on how to change height of Div using height of 300px.
You may edit the following code, and click on Run button.