line-height: ***;
Browser |
|
---|
The line-height property specifies the height of a text line.
The line height of text in the textarea can be specified by applying this property to the TEXTAREA element.
textarea {
width: 300px;
height: 7em;
line-height: 1.5em;
}
Property | Value | Explanation |
---|---|---|
line-height | number, length, %, or normal | the height of a text line |
The default is "normal".
line-height: 1.5;
line-height: 1.5em;
line-height: 150%;
Example
<html>
<head>
<title>TAG index</title>
<style type="text/css">
textarea {
width: 250px;
height: 10em;
}
#example {
line-height: 200%;
}
</style>
</head>
<body>
<form method="POST" action="example.cgi">
<p><textarea name="item1" cols="50" rows="7">
The line height of text.
This is example text.
This is example text.
</textarea></p>
<p><textarea name="item2" cols="50" rows="7" id="example">
The line height of text.
This is example text.
This is example text.
</textarea></p>
</form>
</body>
</html>
- Output
This form cannot submit because of a sample.