Fluid Typography

Fluid Typography

Hard CSS Responsive Design 26 views
Explanation Complexity

Problem Statement

Make heading size scale with viewport using clamp.

Input Format

No input.

Output Format

Print the HTML+CSS code in one block.

Constraints

Use clamp(min, preferred, max).

Input / Output Format

Input Format
No input.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use clamp(min, preferred, max).

Examples

Input:
Output:
(HTML+CSS code)

Example Solution (Public)

CSS
<!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: clamp(24px, 4vw, 46px); font-family: system-ui, Arial, sans-serif; }
  </style>
</head>
<body>
  <h1>meetcode</h1>
</body>
</html>

Official Solution Code

<!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: clamp(24px, 4vw, 46px); font-family: system-ui, Arial, sans-serif; }
  </style>
</head>
<body>
  <h1>meetcode</h1>
</body>
</html>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.