---
id: 61695ab9f6ffe951c16d03dd
title: Hatua ya 2
challengeType: 0
dashedName: step-2
---

# --description--

Ongeza kipengele cha `head` ndani ya kipengele chako cha `html`. Baada tu ya kipengele cha `head`, ongeza kipengele cha `body`.

# --hints--

Unapaswa kuwa na tagi ya `head` ya kufungua.

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

Unapaswa kuwa na tagi ya kufunga ya `head`.

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

Unapaswa kuwa na tagi ya kufungua ya `body`.

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

Unapaswa kuwa na tagi ya kufunga ya `body`.

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

Lazima kuwe na tagi moja pekee ya kufungua ya `head`.

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

Lazima kuwe na tagi moja pekee ya kufunga ya `head`.

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

Lazima kuwe na tagi moja pekee ya kufungua ya `body`.

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

Lazima kuwe na tagi moja pekee ya kufunga ya `body`.

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

Kipengele chako cha `head` kinapaswa kuwa tupu.

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

Kipengele chako cha `body` kinapaswa kuwa tupu.

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

Kipengele chako cha `body` kinapaswa kuja baada ya kipengele chako cha `head`.

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

Kipengele cha `head` kinafaa kuwa ndani ya kipengele cha `html`.

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

Kipengele cha `body` kinafaa kuwa ndani ya kipengele cha `html`.

```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>
```
