---
id: 61695ab9f6ffe951c16d03dd
title: Step 2
challengeType: 0
dashedName: step-2
---

# --description--

Nest a `head` element within the `html` element. Just after the `head` element, add a `body` element.

# --hints--

You should have an opening `head` tag.

```js
assert(code.match(/<head\s*>/i));
```

You should have a closing `head` tag.

```js
assert(code.match(/<\/head\s*>/i));
```

You should have an opening `body` tag.

```js
assert(code.match(/<body\s*>/i));
```

You should have a closing `body` tag.

```js
assert(code.match(/<\/body\s*>/i));
```

There should only be one `head` opening tag.

```js
assert(code.match(/<head\s*>/ig).length === 1);
```

There should only be one `head` closing tag.

```js
assert(code.match(/<\/head\s*>/ig).length === 1);
```

There should only be one `body` opening tag.

```js
assert(code.match(/<body\s*>/ig).length === 1);
```

There should only be one `body` closing tag.

```js
assert(code.match(/<\/body\s*>/ig).length === 1);
```

Your `head` element should be empty.

```js
assert(code.match(/<head\s*>\s*<\/head\s*>/i));
```

Your `body` element should be empty.

```js
assert(code.match(/<body\s*>\s*<\/body\s*>/i));
```

Your `body` element should be placed after your `head` element.

```js
assert(code.match(/<\/head\s*>\s*<body\s*>/i));
```

Your `head` element should be within the `html` element.

```js
assert([...document.querySelector('html')?.children].some(x => x?.localName === 'head'));
```

Your `body` element should be within the `html` element.

```js
assert([...document.querySelector('html')?.children].some(x => x?.localName === 'body'));
```

# --seed--

## --seed-contents--

```html
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--

--fcc-editable-region--
</html>
```
