2021-09-13 09:51:42 -07:00
|
|
|
---
|
|
|
|
id: 612e78af05201622d4bab8aa
|
2021-10-21 10:07:52 -07:00
|
|
|
title: Step 3
|
2021-09-13 09:51:42 -07:00
|
|
|
challengeType: 0
|
2021-10-21 10:07:52 -07:00
|
|
|
dashedName: step-3
|
2021-09-13 09:51:42 -07:00
|
|
|
---
|
|
|
|
|
|
|
|
# --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" />
|
2022-03-14 15:54:43 +00:00
|
|
|
<title>Piano</title>
|
2021-09-13 09:51:42 -07:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
--fcc-editable-region--
|
|
|
|
|
|
|
|
--fcc-editable-region--
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
```
|
|
|
|
|
|
|
|
```css
|
|
|
|
|
|
|
|
```
|