* feat: initial infra * feat: break down steps * feat: tests 1-30 * feat: tests 31 to end * chore: apply gikf's review suggestions Co-authored-by: Krzysztof <60067306+gikf@users.noreply.github.com> * feat: actually testing things helps * chore: apply review suggestions Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> * chore: take the part, put it in a step * chore: apply shaun's review suggestions Co-authored-by: Shaun Hamilton <shauhami020@gmail.com> * chore: missed one Co-authored-by: Shaun Hamilton <shauhami020@gmail.com> * chore: clarify verbiage Co-authored-by: Krzysztof <60067306+gikf@users.noreply.github.com> Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
61 lines
1019 B
Markdown
61 lines
1019 B
Markdown
---
|
|
id: 615f2d4150fe0d4cbd0f2628
|
|
title: Step 2
|
|
challengeType: 0
|
|
dashedName: step-2
|
|
---
|
|
|
|
# --description--
|
|
|
|
Below your `h1` element, add a `p` element with the text `8 servings per container`.
|
|
|
|
# --hints--
|
|
|
|
You should add a new `p` element.
|
|
|
|
```js
|
|
assert.exists(document.querySelector('p'));
|
|
```
|
|
|
|
Your `p` element should be within your `body` element.
|
|
|
|
```js
|
|
assert(document.querySelector('p')?.parentElement?.localName === 'body');
|
|
```
|
|
|
|
Your `p` element should come after your `h1` element.
|
|
|
|
```js
|
|
assert(document.querySelector('p')?.previousElementSibling?.localName === 'h1');
|
|
```
|
|
|
|
Your `p` element should have the text `8 servings per container`.
|
|
|
|
```js
|
|
assert(document.querySelector('p')?.innerText === '8 servings per container');
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```html
|
|
--fcc-editable-region--
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Nutrition Label</title>
|
|
</head>
|
|
<body>
|
|
<h1>Nutrition Facts</h1>
|
|
|
|
</body>
|
|
</html>
|
|
--fcc-editable-region--
|
|
```
|
|
|
|
```css
|
|
|
|
```
|