---
id: 6140c7e645d8e905819f1dd4
title: Hatua ya 1
challengeType: 0
dashedName: step-1
---

# --description--

Anza na msingi wa kanuni wa kawaida (boilerplate). Ongeza tamko lako la `DOCTYPE`, kipengele chako cha `html` chenye lugha iliyowekwa kwa Kiingereza, vipengele vyako vya `head` na `body`.

Ongeza kipengee chako cha `meta` kwa `charset` sahihi, kipengele chako cha `title` na `link` kwa `./styles.css` faili.

Weka `title` kuwa `Ferris Wheel`.

# --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 tamk la `DOCTYPE` kwa `>` baada ya aina.

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

Kipengele chako cha `html` kinafaa kuwa na lebo 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 lebo 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 `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 `body` ya kufungua.

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

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

Kipengele chako cha `meta` kinapaswa kuwa na sifa ya `charset` yenye thamani ya `UTF-8`.

```js
assert.match(code, /<meta[\s\S]+?charset=('|"|`)UTF-8\1/i)
```

Msimbo wako unapaswa kuwa na kipengele cha `title`.

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

Mradi wako unapaswa kuwa na kichwa cha `Ferris Wheel`.

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

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

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

Msimbo wako unapaswa kuwa na kipengele cha `link`.

```js
assert.match(code, /<link/)
```

Unapaswa kuwa na kipengele kimoja cha kujifunga cha `link`.

```js
assert(document.querySelectorAll('link').length === 1);
```

Kipengele chako cha `link` kinapaswa kuwa ndani ya kipengele chako cha `head`.

```js
assert.exists(document.querySelector('head > link'));
```

Kipengele chako cha `link` kinafaa kuwa na sifa ya `rel` yenye thamani `stylesheet`.

```js
const link_element = document.querySelector('link');
const rel = link_element.getAttribute("rel");
assert.equal(rel, "stylesheet");
```

Kipengele chako cha `link` kinafaa kuwa na sifa ya `href` yenye thamani `styles.css`.

```js
const link = document.querySelector('link');
assert.equal(link.dataset.href, "styles.css");
```

# --seed--

## --seed-contents--

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

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

```css

```
