56 lines
1.0 KiB
Markdown
56 lines
1.0 KiB
Markdown
|
---
|
||
|
id: 60a3e3396c7b40068ad6996a
|
||
|
title: Passo 1
|
||
|
challengeType: 0
|
||
|
dashedName: step-1
|
||
|
---
|
||
|
|
||
|
# --description--
|
||
|
|
||
|
Agora, você já deve estar familiarizado com os elementos básicos que uma página em HTML deve ter.
|
||
|
|
||
|
Defina seu código com uma declaração `DOCTYPE` e com os elementos `html`, `head` e `body`.
|
||
|
|
||
|
# --hints--
|
||
|
|
||
|
O código deve ter a declaração `<!DOCTYPE html>`.
|
||
|
|
||
|
```js
|
||
|
assert(code.match(/<!DOCTYPE html>/i));
|
||
|
```
|
||
|
|
||
|
O código deve ter um elemento `html`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelectorAll('html').length === 1);
|
||
|
```
|
||
|
|
||
|
O código deve ter um elemento `head` dentro do elemento `html`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelectorAll('head').length === 1);
|
||
|
```
|
||
|
|
||
|
O código deve ter um elemento `body` dentro do elemento `html`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelectorAll('body').length === 1);
|
||
|
```
|
||
|
|
||
|
O elemento `head` deve estar antes do elemento `body`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelector('body').previousElementSibling.tagName === 'HEAD');
|
||
|
```
|
||
|
|
||
|
# --seed--
|
||
|
|
||
|
## --seed-contents--
|
||
|
|
||
|
```html
|
||
|
--fcc-editable-region--
|
||
|
|
||
|
--fcc-editable-region--
|
||
|
|
||
|
```
|