2020-09-03 19:12:42 -07:00
|
|
|
---
|
|
|
|
id: 5f344fbc22624a2976425065
|
2021-10-21 10:07:52 -07:00
|
|
|
title: Step 10
|
2020-09-03 19:12:42 -07:00
|
|
|
challengeType: 0
|
2021-10-21 10:07:52 -07:00
|
|
|
dashedName: step-10
|
2020-09-03 19:12:42 -07:00
|
|
|
---
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --description--
|
2020-09-03 19:12:42 -07:00
|
|
|
|
2021-07-21 12:03:09 -07:00
|
|
|
Create an `h2` element in the `section` element and give it the text `Coffee`.
|
2020-09-03 19:12:42 -07:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --hints--
|
2020-09-03 19:12:42 -07:00
|
|
|
|
2021-07-21 12:03:09 -07:00
|
|
|
You should have an opening `<h2>` tag.
|
2020-09-03 19:12:42 -07:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
```js
|
2021-07-21 12:03:09 -07:00
|
|
|
assert(code.match(/<h2\s*>/i));
|
|
|
|
```
|
|
|
|
|
|
|
|
You should have a closing `</h2>` tag.
|
|
|
|
|
|
|
|
```js
|
|
|
|
assert(code.match(/<\/h2\s*>/i));
|
|
|
|
```
|
|
|
|
|
|
|
|
You should not change your existing `section` element. Make sure you did not delete the closing tag.
|
|
|
|
|
|
|
|
```js
|
|
|
|
assert($('section').length === 1);
|
|
|
|
```
|
|
|
|
|
|
|
|
Your `h2` element should be within your `section` element.
|
|
|
|
|
|
|
|
```js
|
|
|
|
const h2 = document.querySelector('h2');
|
|
|
|
assert(h2.parentElement.tagName === 'SECTION');
|
|
|
|
```
|
|
|
|
|
|
|
|
Your `h2` element should have the text `Coffee`.
|
2020-09-03 19:12:42 -07:00
|
|
|
|
2021-07-21 12:03:09 -07:00
|
|
|
```js
|
|
|
|
const h2 = document.querySelector('h2');
|
|
|
|
assert(h2.innerText === 'Coffee');
|
2020-09-03 19:12:42 -07:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --seed--
|
2020-09-03 19:12:42 -07:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
## --seed-contents--
|
2020-09-03 19:12:42 -07:00
|
|
|
|
|
|
|
```html
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
2022-03-14 15:54:43 +00:00
|
|
|
<title>Cafe Menu</title>
|
2020-09-03 19:12:42 -07:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<h1>CAMPER CAFE</h1>
|
|
|
|
<p>Est. 2020</p>
|
|
|
|
</header>
|
|
|
|
<main>
|
2020-11-27 19:02:05 +01:00
|
|
|
--fcc-editable-region--
|
2020-09-03 19:12:42 -07:00
|
|
|
<section>
|
|
|
|
</section>
|
2020-11-27 19:02:05 +01:00
|
|
|
--fcc-editable-region--
|
2020-09-03 19:12:42 -07:00
|
|
|
</main>
|
|
|
|
</body>
|
|
|
|
<html>
|
|
|
|
```
|