Files
freeCodeCamp/curriculum/challenges/english/01-responsive-web-design/css-piano/part-005.md
Nicholas Carrigan (he/him) 2cf4a7d787 feat(curriculum): add piano project (#43364)
* feat: i broke it horribly

* fix: background colour first

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* fix: missing asserts

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* fix: remove extra background

* fix: meta order

* feat: clarify descriptions

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2021-09-13 17:51:42 +01:00

1.2 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
612e804c54d5e7308d7ebe56 Part 5 0 part-5

--description--

Within your .keys element, add seven div elements. Give them all the class key.

--hints--

You should create seven new div elements.

const divDivDiv = document.querySelectorAll('div');
assert(divDivDiv?.length === 9);

Your seven new div elements should be within your .keys element.

const keys = document.querySelector('.keys');
assert([...keys?.children].length === 7);
assert([...keys?.children].every(child => child?.tagName === 'DIV'));

Your seven new div elements should all have the class set to key.

const keys = document.querySelector('.keys');
assert([...keys?.children].every(child => child?.classList?.contains('key')));

--seed--

--seed-contents--

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Responsive Web Design Piano</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body>
    --fcc-editable-region--
    <div id="piano">
      <div class="keys"></div>
    </div>
    --fcc-editable-region--
  </body>
</html>