CSS CSS Basics Basic Selectors ID and Class Selectors

ROBERT BUTLER
ROBERT BUTLER
2,008 Points

header element question

Give the header element a class attribute. Then, set the class value to main-header.

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>Developer Diane: Resume</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 */
<header class="main-header">main-header</header>

3 Answers

ROBERT BUTLER
ROBERT BUTLER
2,008 Points

Hello,

I tried a few different answers but would it something else. I like to figure this out if possible.

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

Reggie Williams
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Reggie Williams
Treehouse Teacher

Hey ROBERT BUTLER great work! You have the right code but the header tag is HTML and belongs in the index.html file not the css file

ROBERT BUTLER
ROBERT BUTLER
2,008 Points

Hello Reggie,

It work but did I missed on how to decide to place the header tag on HTML. I had believed it would be for CSS.

Thanks again.

Reggie Williams
seal-mask
.a{fill-rule:evenodd;}techdegree
Reggie Williams
Treehouse Teacher

You're welcome, ROBERT BUTLER, great work making the fix! With more practice you'll be able to tell the difference more easily. HTML will be made up of the tags like <header></header> with text between them. CSS will have a selector and a style statement like element{ property:value } Keep asking questions and experimenting. Happy Learning!