Files
freeCodeCamp/curriculum/challenges/english/01-responsive-web-design/css-piano/step-004.md
Nicholas Carrigan (he/him) b36cdbafd1 chore: rename "part" to "step" (#43934)
* chore: rename part to step

* chore: update metas

* chore: more renaming

* chore: update tooling

* chore: update frontmatter

* chore(tools): title testing
2021-10-21 18:07:52 +01:00

1.1 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
612e7d1c29fb872d6384379c Step 4 0 step-4

--description--

Nest a second div within your existing div, and set the class to be keys.

--hints--

You should create a second div element.

const divDiv = document.querySelectorAll('div');
assert(divDiv?.length === 2);

Your new div element should be within your existing div element.

const div = document.querySelector('div');
assert(div?.children?.length === 1);
assert(div?.children?.[0]?.localName === 'div');

Your new div element should have the class set to keys.

const div = document.querySelector('div');
assert(div?.children?.[0]?.className === 'keys');

--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>
    <div id="piano">
  --fcc-editable-region--

  --fcc-editable-region--
    </div>
  </body>
</html>