Input
Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>em Unit Example</title> <style> .container { font-size: 16px; padding: 20px; background-color: #f0f8ff; } .text { font-size: 2em; /* 32px */ margin-top: 1.5em; /* 24px */ color: darkslateblue; } </style> </head> <body> <div class="container"> <p class="text">This text is 2em (32px), with 1.5em (24px) margin-top</p> </div> </body> </html>