Learn accessibility by building a quiz step 17. Please I need urgent help

MY HTML

  <h1 class="container">HTML/CSS Quiz</h1>
  <nav>
    <ul>
      <li><a>INFO</a></li>
      <li><a>HTML</a></li>
      <li><a>CSS</a></li>
		  </ul>
  </nav>
</header>
<main>
  <form method="post" action="https://freecodecamp.org/practice-project/accessibility-quiz">
    <section role="region" aria-labelledby="student-info">
      <h2 class="container" id="student-info">Student Info</h2>
    </section>
    <section role="region" aria-labelledby="html-questions">
      <h2 class="container" id="html-questions">HTML</h2>
    </section>
    <section role="region" aria-labelledby="css-questions">
      <h2 class="container" id="css-questions">CSS</h2>
    </section>
  </form>
</main>

MY CSS
body {

background: #f5f6f7;

color: #1b1b32;

font-family: Helvetica;

margin: 0;

}

header {

width: 100%;

height: 50px;

background-color: #1b1b32;

display: flex;

}

#logo {

width: max(100px, 18vw);

background-color: #0a0a23;

aspect-ratio: 35 / 4;

padding: 0.4rem;

}

h1 {

color: #f1be32;

font-size: min(5vw, 1.2em);

}

nav {

width: 50%;

max-width: 300px;

height: 50px;

}

nav > ul {

display: flex;

justify-content: space-evenly;

}

.container{

font-family: Verdana, Arial, sans-serif;

}

h2{

border-bottom: 4px solid #dfdfe2

}https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-accessibility-by-building-a-quiz/step-17

the challenge asking you to target 2 elements. what you did is correct but the purpose of this step is teaching you how to target 2 elements

so u can target 2 elements in CSS by adding ( , ) between them so now i can target
p and h1 and span elements like this:

p, h1, span{
   font-size: 16px;
}

but if you want to target a p element that nested inside a div like

<div> 
  <p> Hi </p>
</div>

you target it like this in CSS

div p{
  font-size: 16px;
}

or like this

div > p{
font-size: 16px;
}

so in short with COMMA
h1, h2 it means h1 and h2.

and without COMMA
h1 h2 means any h2 that inside an h1.

HAPPY CODING !

3 Likes

Thanks a lot. It worked!

h1,h2{

font-family: Verdana, Arial, sans-serif;

}

h2{

border-bottom: 4px solid #dfdfe2

}

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.