Align Items Baseline

Align Items Baseline

Medium CSS Flexbox Layout 23 views
Explanation Complexity

Problem Statement

Align headings and small text on a baseline.

Input Format

No input.

Output Format

Print the HTML+CSS code in one block.

Constraints

Use align-items: baseline.

Input / Output Format

Input Format
No input.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use align-items: baseline.

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>
    .row { display: flex; align-items: baseline; gap: 12px; }
    .tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eafaf1; }
  </style>
</head>
<body>
  <div class='row'>
    <h1>meetcode</h1>
    <span class='tag'>new</span>
  </div>
</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>
    .row { display: flex; align-items: baseline; gap: 12px; }
    .tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eafaf1; }
  </style>
</head>
<body>
  <div class='row'>
    <h1>meetcode</h1>
    <span class='tag'>new</span>
  </div>
</body>
</html>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.