Use Rem Units
CSS
Medium
2 views
Problem Description
Set font sizes using rem so it scales with root size.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use rem units for heading and paragraph.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
<style>
html { font-size: 16px; }
h1 { font-size: 2rem; }
p { font-size: 1rem; }
</style>
</head>
<body>
<h1>meetcode</h1>
<p>Rem units feel consistent.</p>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!