---
id: 612e6afc009b450a437940a1
title: Hatua ya 1
challengeType: 0
dashedName: step-1
---

# --description--

Anza na muundo wa msingi wa HTML. Ongeza tamko la `DOCTYPE`, na vipengele vya `html`, `head`, `body` na `title`.

Weka lugha ya ukurasa huu kwa Kiingereza. Weka `title` kuwa `Piano`.

# --hints--

Msimbo wako unapaswa kuwa na rejeleo la `DOCTYPE`.

```js
assert(code.match(/<!DOCTYPE/gi));
```

Unapaswa kujumuisha nafasi baada ya rejeleo la `DOCTYPE`.

```js
assert(code.match(/<!DOCTYPE\s+/gi));
```

Unapaswa kufafanua aina ya hati kuwa `html`.

```js
assert(code.match(/<!DOCTYPE\s+html/gi));
```

Unapaswa kufunga tamko la `DOCTYPE` kwa `>` baada ya aina.

```js
assert(code.match(/<!DOCTYPE\s+html\s*>/gi));
```

Kipengele chako cha `html` kinafaa kuwa na tagi ya ufunguzi yenye sifa ya `lang` ya `en`.

```js
assert(code.match(/<html\s+lang\s*=\s*('|")en\1\s*>/gi));
```

Kipengele chako cha `html` kinapaswa kuwa na tagi ya kufunga.

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

Tamko lako la `DOCTYPE` linapaswa kuwa mwanzoni mwa HTML yako.

```js
assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
```

Unapaswa kuwa na tagi ya kufungua ya `head`.

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

Vipengele vya `head` na `body` vinapaswa kuwa ndugu.

```js
assert(document.querySelector('head')?.nextElementSibling?.localName === 'body');
```

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'));
```

Msimbo wako unapaswa kuwa na kipengele cha `title`.

```js
const title = document.querySelector('title');
assert.exists(title);
```

Mradi wako unapaswa kuwa na kichwa cha `Piano`.

```js
const title = document.querySelector('title');
assert.equal(title?.text?.trim()?.toLowerCase(), 'piano')
```

Kumbuka, ukubwa wa herufi na tahajia ni jambo la muhimu katika kichwa.

```js
const title = document.querySelector('title');
assert.equal(title?.text?.trim(), 'Piano');
```

# --seed--

## --seed-contents--

```html
--fcc-editable-region--

--fcc-editable-region--
```

```css

```
