Learn Responsive Web Design by Building a Piano - Step 6

Tell us what’s happening:

I am stuck on step 6. I keep getting an error that the " Your third .key should have black--key in the class ." Since my code is exactly the same for 2,3,5,6 and 7th div class it makes no sense why it doesn’t work. I tried resseting at least 20 times and still the same issue with div 3.

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 class=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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0

Challenge Information:

Learn Responsive Web Design by Building a Piano - Step 6

hello hope you’re fine i really appreciate the way you formulated your problem!

The problem with your code is that you added two class attribute! You can assign two class name to a tag element but there is one attribute class. For example class="fruit orange" .

I didn’t know if i explained it well! Hope I was helpful!! Happy coding! :+1: :+1:

2 Likes

Thank you, that helped. What confused me is that it was giving error within the third element (meaning that it accepted the second one, which I interpreted as being valid, while in fact it was not). In any case thank you very much.

2 Likes

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