* chore(curriculum): accessibility-quiz * chore(curriculum): cafe-menu * chore(curriculum): ferris-wheel * chore(curriculum): fix ferris-wheel tests * chore(curriculum): colored-markers * chore(curriculum): photo-gallery * chore(curriculum): magazine * chore(curriculum): penguin * chore(curriculum): city-skyline * chore(curriculum): registration-form * chore(curriculum): picasso-painting * chore(curriculum): balance-sheet * chore(curriculum): piano * chore(curriculum): rothko-painting * fix: title min 15 chars
58 lines
965 B
Markdown
58 lines
965 B
Markdown
---
|
|
id: 612e78af05201622d4bab8aa
|
|
title: Step 3
|
|
challengeType: 0
|
|
dashedName: step-3
|
|
---
|
|
|
|
# --description--
|
|
|
|
Time to start working on the piano. Create a `div` element within your `body` element with the `id` set to `piano`.
|
|
|
|
# --hints--
|
|
|
|
You should create a new `div` element.
|
|
|
|
```js
|
|
const div = document.querySelector('div');
|
|
assert.exists(div);
|
|
```
|
|
|
|
Your `div` should be within your `body` element.
|
|
|
|
```js
|
|
const div = document.querySelector('div');
|
|
assert(div?.parentElement?.localName === 'body');
|
|
```
|
|
|
|
Your `div` should have the `id` set to `piano`.
|
|
|
|
```js
|
|
const div = document.querySelector('div');
|
|
assert(div?.getAttribute('id') === 'piano');
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```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>
|
|
--fcc-editable-region--
|
|
|
|
--fcc-editable-region--
|
|
</body>
|
|
</html>
|
|
```
|
|
|
|
```css
|
|
|
|
```
|