Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> div.a { line-height: 1; } div.b { line-height: 50px; } div.c { line-height: 0.5cm; } div.d { line-height: 1cm; } div.e { line-height: 200%; } div.f { line-height: normal; } </style> </head> <body> <h2>Line-height property example</h2> <h3>line-height: 1</h3> <div class="a">This is a paragraph with a specified line-height. <br> The line height here is set to 1. </div> <h3>line-height: 50px</h3> <div class="b">This is a paragraph with a specified line-height. <br> The line height here is set to 50 pixels. </div> <h3>line-height: 0.5cm</h3> <div class="c">This is a paragraph with a specified line-height. <br> The line height here is set to 0.5 centimeter. </div> <h3>line-height: 1cm</h3> <div class="d">This is a paragraph with a specified line-height. <br> The line height here is set to 1 centimeter. </div> <h3>line-height: 200%</h3> <div class="e">This is a paragraph with a bigger line-height. <br> The line height here is set to 200%. </div> <h3>line-height: normal</h3> <div class="f">This is a paragraph with a standard line-height. <br> The standard line height in most browsers is about 110% to 120%. </div> </body> </html>