To change height of paragraph using CSS, you can set the height
style property for the paragraph elements with the values like 100px
, 5in
, 50%
, etc.
The following is the typical CSS code to change height of paragraph in HTML page using tag name p
.
p {
height: 100px;
}
p {
height: 5in;
}
p {
height: 50%;
}
We shall go through some working examples on how to change height of paragraph 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 Paragraph elements.
This is an example on how to change height of paragraph using height in pixels .
You may edit the following code, and click on Run button.
This is an example on how to change height of paragraph using height in inches.
You may edit the following code, and click on Run button.
This is an example on how to change height of paragraph using height in percentage of parent element.
You may edit the following code, and click on Run button.