CSS CSS Basics Basic Selectors ID and Class Selectors

ROBERT BUTLER
ROBERT BUTLER
2,008 Points

In the HTML file, give the h1 element the class main-heading

In the HTML file, give the h1 element the class main-heading

index.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Developer Diane: Resume</title>
  <link rel="stylesheet" href="page.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main>
    <header>
      <div>
        <h1 class="main-heading">Developer Diane</h1>
        <address>
          <p>website: developerdiane.com</p>
          <p>email: diane@developerdiane.com</p>
        </address>
        <img src="developer-diane.jpg" alt="Developer Diane coding on her laptop.">
      </div>
    </header>          
    <section>
      <h2>Experience</h2>
      <ul>
        <li>
          <h3>Super Web Design Shop</h3>
          <p>Junior Developer</p>
          <p class="date special">February 2020-present</p>
        </li>
        <li>
          <h3>Pretty Good Websites, Inc.</h3>
          <p>Web Development Intern</p>
          <p>July 2019-January 2020</p>
        </li>
      </ul>
    </section>
    <footer>©2020 Developer Diane.</footer>
  </main>
</body>
</html>
style.css
/* Complete the challenge by writing CSS below */
.main-header {
  background-color: orange; 
}

2 Answers

ROBERT BUTLER
ROBERT BUTLER
2,008 Points

Hello,

My battery is getting low and I have tried to figure this one out. Any help would be good.

Thank you,

<h1 class="main-heading">/h1> </header>

Cameron Childres
MOD
Cameron Childres
Treehouse Moderator 11,694 Points

Hi Robert,

The challenge asks for you to give a class name of main-header. You've given it the class of main-heading.