Line Height Code

Example Code


<!-- Codes by HTMLmagics -->
<p style="width:180px;float:left;background-color:#ffc;">Normal text: This text does not have its line height specified. Therefore it uses a default value.</p>
<p style="line-height:30px;width:180px;float:right;background-color:#eee;">Adjusted line-height: This text has got a line-height value of 30 pixels.</p>
<p style="line-height:1.5em;width:180px;float:left;background-color:#eee;">Adjusted line-height: This text has got a line-height value of 1.5em.</p>
<p style="line-height:130%;width:180px;float:right;background-color:#eee;">Adjusted line-height: This text has got a line-height value of 130 percent.</p>
<p style="line-height:2.8;width:180px;float:left;background-color:#eee;">Adjusted line-height: This text has got a line-height value of 2.8.</p>
<p><a  style="font-size:11px;color:#999;" href="http://www.htmlcodes.me/text/line-height.cfm">HTML line height</a></p>



Result



Normal text: This text does not have its line height specified. Therefore it uses a default value.

Adjusted line-height: This text has got a line-height value of 30 pixels.

Adjusted line-height: This text has got a line-height value of 1.5em.

Adjusted line-height: This text has got a line-height value of 130 percent.

Adjusted line-height: This text has got a line-height value of 2.8.

HTML line height