Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> p { font-size: 16px; line-height: 2em; } div { font-size: 30px; border: 1px solid black; } span { font-size: 0.5em; } </style> </head> <body> <p>These paragraphs have a calculated line-height of: 2x16px = 32px.</p> <p>These paragraphs have a calculated line-height of: 2x16px = 32px.</p> <p>These paragraphs have a calculated line-height of: 2x16px = 32px.</p> <div>The font-size of the div element is set to 30px. <span>The span element inside the div element has a font-size of 0.5em, which equals to 0.5x30 = 15px</span>.</div> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss_unit_em by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:33:36 GMT --> </html>
Result:
Try it Yourself - © w3schools.com