My code is not working, tried severally

Tell us what’s happening:
Describe your issue in detail here.
I don’t know what I’m getting wrong

  **Your code so far**
\ file: <!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8" />
  <title>Piano</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
  <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"></div>
    </div>
  </div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8" />
  <title>Piano</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
  <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"></div>
    </div>
  </div>
</body>
</html>
\ file: 

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36 Edg/100.0.1185.50

Challenge: Step 6

Link to the challenge:

I dont think this is the first time you add multiple class.
This is an example with multiple classes:

<p class="red-text bold"></p>

/* The Syntax: */
<element class="class1 class2"></element>

The correct way to introduce multiple class is by including a space in between both class names. Your class names were separated by (–) which is incorrect:

/* Correct Syntax: */
<div class="key" class="black key"></div>

Now thats wrong, the class name itself is black--key. Please make sure you give the right info before posting .


Your syntax is wrong too

The class attribute is not used twice.
Maybe you didn’t see the other class?

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