Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Setting Line Height using CSS</title> <style> p { line-height: 1.2; border: 1px solid #00ff00; } div { line-height: 200%; border: 1px solid #ff0000; } </style> </head> <body> <h1>Change the values to see how it works</h1> <p>The <code>line-height</code> property sets the height between lines of text.<br> The line height of this paragraph is specified using number.</p> <div>The <code>line-height</code> property sets the height between lines of text.<br> The line height of this paragraph is specified using percentage.</div> </body> </html>