Input
Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>REM Units Example</title> <style> html { font-size: 16px; /* Base size */ } .container { font-size: 1.5rem; /* 24px */ background-color: #e0f7fa; padding: 1rem; /* 16px padding */ } .text { font-size: 2rem; /* 32px */ color: #00796b; margin-top: 1rem; /* 16px */ } </style> </head> <body> <div class="container"> <p>This container uses <strong>1.5rem</strong> font size (24px).</p> <p class="text">This text uses <strong>2rem</strong> (32px), relative to root.</p> </div> </body> </html>