2021-10-14 23:33:13 +01:00
|
|
|
---
|
|
|
|
id: 60f027099a15b00485563dd2
|
2021-10-21 10:07:52 -07:00
|
|
|
title: Step 2
|
2021-10-14 23:33:13 +01:00
|
|
|
challengeType: 0
|
2021-10-21 10:07:52 -07:00
|
|
|
dashedName: step-2
|
2021-10-14 23:33:13 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
|
|
Add opening and closing `html` tags below the `DOCTYPE` so you have a place to start putting some code.
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
2022-02-10 14:28:55 -08:00
|
|
|
Your `DOCTYPE` declaration should be at the beginning of your HTML.
|
2021-10-14 23:33:13 +01:00
|
|
|
|
|
|
|
```js
|
2022-02-10 14:28:55 -08:00
|
|
|
assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
|
2021-10-14 23:33:13 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Your `html` element should have an opening tag.
|
|
|
|
|
|
|
|
```js
|
|
|
|
assert(code.match(/<html\s*>/gi));
|
|
|
|
```
|
|
|
|
|
|
|
|
Your `html` element should have a closing tag.
|
|
|
|
|
|
|
|
```js
|
|
|
|
assert(code.match(/<\/html\s*>/));
|
|
|
|
```
|
|
|
|
|
|
|
|
Your `html` tags should be in the correct order.
|
|
|
|
|
|
|
|
```js
|
|
|
|
assert(code.match(/<html\s*>\s*<\/html\s*>/));
|
|
|
|
```
|
|
|
|
|
|
|
|
You should only have one `html` element.
|
|
|
|
|
|
|
|
```js
|
|
|
|
// Possibly a redundant test, as browser fixes this
|
|
|
|
assert(document.querySelectorAll('html').length === 1);
|
|
|
|
```
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
```html
|
|
|
|
--fcc-editable-region--
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
--fcc-editable-region--
|
|
|
|
```
|