Smaller Title on Mobile
CSS
Easy
2 views
Problem Description
Make h1 smaller on screens under 480px.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use a media query and change font-size.
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>
h1 { font-size: 40px; font-family: system-ui, Arial, sans-serif; }
@media (max-width: 480px) { h1 { font-size: 28px; } }
</style>
</head>
<body>
<h1>meetcode</h1>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!