Set height for paragraph to 100px in HTML and CSS
Description
The following code shows how to set height for paragraph to 100px.
Example
<html>
<head>
<style rel="stylesheet" type="text/css">
p.one {<!--from w ww. j a v a2s.c o m-->
width: 200px;
height: 100px;
padding: 5px;
margin: 10px;
border-style: solid;
border-color: #000000;
border-width: 2px;
}
p.two {
width: 300px;
height: 100px;
padding: 5px;
margin: 10px;
border-style: solid;
border-color: #000000;
border-width: 2px;
}
</style>
</head>
<body>
<p class="one">This paragraph should be 200 pixels wide by 300 pixels high.</p>
<p class="two">This paragraph should be 300 pixels wide by 100 pixels high.</p>
</body>
</html>
The code above generates the following result.
HTML CSS Tutorial Size
Compare height setting in inch and pixel in...
Compare width between pixel and inch measur...
Float blocks and percentage width in HTML a...
Set height auto in HTML and CSS
Set height to 1in(Inch) in HTML and CSS
Set max-height to 200px in HTML and CSS
Set max width in HTML and CSS
Set min height for three column layout in H...
Set min-width in HTML and CSS
Set min-width to 200px in HTML and CSS
Set width and height for paragraph in HTML ...
Set width and height to auto for table in H...
Set width and height to auto in HTML and CS...
Set width to 100% in HTML and CSS
Set width to 12em in HTML and CSS
Set width to 1in in HTML and CSS
Set width to 250px in HTML and CSS
Set width to auto in HTML and CSS
Use percentage value to set width and heigh...
Compare height setting in inch and pixel in...
Compare width between pixel and inch measur...
Float blocks and percentage width in HTML a...
Set height auto in HTML and CSS
Set height for paragraph to 100px in HTML a...
Set height to 100% in HTML and CSSSet height to 1in(Inch) in HTML and CSS
Set max-height to 200px in HTML and CSS
Set max width in HTML and CSS
Set min height for three column layout in H...
Set min-width in HTML and CSS
Set min-width to 200px in HTML and CSS
Set width and height for paragraph in HTML ...
Set width and height to auto for table in H...
Set width and height to auto in HTML and CS...
Set width to 100% in HTML and CSS
Set width to 12em in HTML and CSS
Set width to 1in in HTML and CSS
Set width to 250px in HTML and CSS
Set width to auto in HTML and CSS
Use percentage value to set width and heigh...