Files
Shaun Hamilton 25aa04e2e7 chore(curriculum): standardise titles for rwd-beta (#45398)
* 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
2022-03-14 16:54:43 +01:00

80 lines
1.8 KiB
Markdown

---
id: 6140c9d35015ae0ba0c250e8
title: Step 2
challengeType: 0
dashedName: step-2
---
# --description--
Add a `div` within your `body` element and give it a `class` of `wheel`.
Inside your new `div`, add six `span` elements with a `class` set to `line`, and six `div` elements with a `class` set to `cabin`.
# --hints--
You should create a new `div` within your `body` element.
```js
const divs = [...document.querySelector('body')?.children].filter(child => child?.localName === 'div');
assert(divs?.length === 1);
```
Your `div` within your `body` element should have a `class` of `wheel`.
```js
assert(document.querySelector('body div')?.classList?.contains('wheel'));
```
Your `.wheel` element should have six `span` elements within.
```js
assert(document.querySelectorAll('.wheel span')?.length === 6);
```
Your six `span` elements within the `.wheel` element should have a `class` of `line`.
```js
const spans = [...document.querySelectorAll('.wheel span')];
assert(spans?.every(span => span?.classList?.contains('line')));
assert(document.querySelectorAll('.line')?.length === 6);
```
Your `.wheel` element should have six `div` elements within.
```js
assert(document.querySelectorAll('.wheel div')?.length === 6);
```
Your six `div` elements within the `.wheel` element should have a `class` of `cabin`.
```js
const divs = [...document.querySelectorAll('.wheel div')];
assert(divs?.every(div => div?.classList?.contains('cabin')));
assert(document.querySelectorAll('.cabin')?.length === 6);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Ferris Wheel</title>
<link rel="stylesheet" href="./styles.css" />
</head>
--fcc-editable-region--
<body>
</body>
--fcc-editable-region--
</html>
```
```css
```