Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of relative units</title> <style> body { font-size: 12px; } h1 { width: 50%; font-size: 3em; background-color: #ff00ff; } p { width: 80%; font-size: 2em; background-color: #fff000; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>