---
id: 61537d86bdc3dd343688fceb
title: Hatua ya 6
challengeType: 0
dashedName: step-6
---

# --description--

Ifuatayo, ipe kila `img` sifa ya `src` kulingana na mpangilio wake katika hati. `img` ya kwanza inapaswa kuwa na `src` ya `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/1.jpg`. Zilizosalia zinapaswa kuwa sawa, isipokuwa badilisha `1` na nambari ambayo `img` iko kwenye hati.

# --hints--

Vipengele vyako vyote tisa vya `img` vinapaswa kuwa na sifa ya `src`.

```js
const images = [...document.querySelectorAll('img')];
assert(images.every(image => image.getAttribute('src')));
```

Kipengele chako cha kwanza cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/1.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[0]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/1.jpg');
```

Kipengele chako cha pili cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/2.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[1]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/2.jpg');
```

Kipengele chako cha tatu cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/3.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[2]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/3.jpg');
```

Kipengele chako cha nne cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/4.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[3]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/4.jpg');
```

Kipengele chako cha tano cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/5.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[4]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/5.jpg');
```

Kipengele chako cha sita cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/6.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[5]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/6.jpg');
```

Kipengele chako cha saba cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/7.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[6]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/7.jpg');
```

Kipengele chako cha nane cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/8.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[7]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/8.jpg');
```

Kipengele chako cha tisa cha `img` kinapaswa kuwa na `https://cdn.freecodecamp.org/curriculum/css-photo-gallery/9.jpg` iliyowekwa kama thamani ya sifa ya `src`.

```js
assert(document.querySelectorAll('img')?.[8]?.getAttribute('src') === 'https://cdn.freecodecamp.org/curriculum/css-photo-gallery/9.jpg');
```

# --seed--

## --seed-contents--

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Photo Gallery</title>
    <link rel="stylesheet" href="./styles.css">
  </head>
  <body>
    <header class="header">
      <h1>css flexbox photo gallery</h1>
    </header>
--fcc-editable-region--
    <div class="gallery">
      <img>
      <img>
      <img>
      <img>
      <img>
      <img>
      <img>
      <img>
      <img>
    </div>
--fcc-editable-region--
  </body>
</html>
```

```css

```
