Learn Responsive Web Design by Building a Piano - Step 6

Tell us what’s happening:

The first black–key class passes but not the second (which is the third .key element). What am I doing wrong?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Piano</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body>

<!-- User Editable Region -->

    <div id="piano">
      <div class="keys">
        <div class="key"></div>
        <div class="key class=black--key"></div>
        <div class="key class=black--key"></div>
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key class=black--key"></div>
        <div class="key class=black--key"></div>
      </div>
    </div>

<!-- User Editable Region -->

  </body>
</html>
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Challenge Information:

Learn Responsive Web Design by Building a Piano - Step 6

This is the correct way to add multiple classes to an element:

This is not:

1 Like

That worked, thanks!

2 Likes