2020-09-03 19:12:42 -07:00
|
|
|
---
|
|
|
|
id: 5f3313e74582ad9d063e3a38
|
2021-10-21 10:07:52 -07:00
|
|
|
title: Step 2
|
2020-09-03 19:12:42 -07:00
|
|
|
challengeType: 0
|
2021-10-21 10:07:52 -07:00
|
|
|
dashedName: step-2
|
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
|
|
|
|
2022-03-14 15:54:43 +00:00
|
|
|
Add a `head` element within the `html` element, so you can add a `title` element. The title element's text should be `Cafe Menu`.
|
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 `<head>` 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(/<head>/i));
|
|
|
|
```
|
|
|
|
|
|
|
|
You should have a closing `</head>` tag.
|
|
|
|
|
|
|
|
```js
|
|
|
|
assert(code.match(/<head>/i));
|
|
|
|
```
|
|
|
|
|
|
|
|
You should have an opening `<title>` tag.
|
|
|
|
|
|
|
|
```js
|
|
|
|
assert(code.match(/<title>/i));
|
|
|
|
```
|
|
|
|
|
|
|
|
You should have a closing `</title>` tag.
|
2020-09-03 19:12:42 -07:00
|
|
|
|
2021-07-21 12:03:09 -07:00
|
|
|
```js
|
|
|
|
assert(code.match(/<\/title>/i));
|
|
|
|
```
|
|
|
|
|
|
|
|
Your `<title>` element should be nested in your `<head>` element.
|
|
|
|
|
|
|
|
```js
|
2022-01-26 01:29:28 +02:00
|
|
|
assert(code.match(/<head>\s*<title>.*<\/title>\s*<\/head>/si));
|
2021-07-21 12:03:09 -07:00
|
|
|
```
|
|
|
|
|
2022-03-14 15:54:43 +00:00
|
|
|
Your `<title>` element should have the text `Cafe Menu`. You may need to check your spelling.
|
2021-07-21 12:03:09 -07:00
|
|
|
|
|
|
|
```js
|
2022-03-14 15:54:43 +00:00
|
|
|
assert.match(document.querySelector('title')?.innerText, /Cafe Menu/i);
|
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>
|
|
|
|
--fcc-editable-region--
|
|
|
|
|
|
|
|
--fcc-editable-region--
|
|
|
|
</html>
|
|
|
|
```
|