First Child Highlight

First Child Highlight

Medium CSS CSS Foundations 12 views
Explanation Complexity

Problem Statement

Highlight only the first list item in a meetcode topic list.

Input Format

No input.

Output Format

Print the HTML+CSS code in one block.

Constraints

Use :first-child.

Input / Output Format

Input Format
No input.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use :first-child.

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>
    li:first-child { font-weight: 700; }
  </style>
</head>
<body>
  <ul>
    <li>HTML Basics</li>
    <li>Forms</li>
    <li>CSS</li>
  </ul>
</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>
    li:first-child { font-weight: 700; }
  </style>
</head>
<body>
  <ul>
    <li>HTML Basics</li>
    <li>Forms</li>
    <li>CSS</li>
  </ul>
</body>
</html>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.