Files

61 lines
1019 B
Markdown
Raw Permalink Normal View History

---
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
```