---
id: 6899b593d232e07617f74055
title: Step 4
challengeType: 0
dashedName: step-4
---

# --description--

Inside the `button` element, create a `span` element that contains `😊`

Give to the `span` element a `role` attribute with a value of `img` and an `aria-hidden` attribute with a value of `true`.

Then, create a second `span` element with a `class` of `count` containing the text `0/10`.

# --hints--

Inside the `button` element there should be two `span` elements.

```js
assert.lengthOf(document.querySelectorAll("button > span"), 2);
```

The first `span` element should have a text content of `😊`.

```js
assert.equal(document.querySelectorAll("button > span")[0]?.textContent.trim(), "😊");
```

The first `span` element should have a `role` attribute with value of `img`.

```js
assert.equal(document.querySelectorAll("button > span")[0]?.getAttribute("role"), "img");
```

The first `span` element should have an `aria-hidden` attribute with value of `true`.

```js
assert.equal(document.querySelectorAll("button > span")[0]?.getAttribute("aria-hidden"), "true");
```

The second `span` element should have a `class` attribute with value of `count`.

```js
assert.equal(document.querySelectorAll("button > span")[1]?.className, "count");
```

The second `span` element should have a text content of `0/10`.

```js
assert.equal(document.querySelectorAll("button > span")[1]?.textContent.trim(), "0/10");
```

# --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>Emoji Reactor</title>
  <link rel="stylesheet" href="./styles.css" />
</head>
<body>
  <main>

    <h1 class="title">How are you feeling today?</h1>

    <p class="description">
      Click on the buttons below to rate your emotions.
    </p>
    <div class="btn-container">
--fcc-editable-region--
      <button id="happy-btn" class="emoji-btn" aria-label="Happy face emoji">
        
      </button>
--fcc-editable-region--
    </div>
  </main>
</body>
</html>
```

```css
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --light-grey: #efefef;
  --white: #ffffff;
  --very-dark-blue: #0a0a23;
  --light-purple: #a78bfa;
  --very-light-purple: #c4b5fd;
  --purple: #8b5cf6;
}

body {
  background-color: var(--very-dark-blue);
  color: var(--light-grey);
  font-family: sans-serif;
}

main {
  text-align: center;
  padding: 10px;
}

.btn-container,
button {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}

.btn-container {
  flex-direction: column;
}

.emoji-btn {
  width: 70%;
  cursor: pointer;
  color: var(--white);
  background-color: var(--light-purple);
  background-image: linear-gradient(
    to bottom,
    var(--very-light-purple),
    var(--light-purple)
  );
  border: 3px solid var(--purple);
  border-radius: 8px;
  padding: 10px;
  font-size: 1.5rem;
  margin: 10px 0;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

@media (min-width: 768px) {
  .emoji-btn {
    width: 30%;
  }
}

.emoji-btn:hover {
  background-color: var(--purple);
  background-image: none;
}

.title {
  margin-top: 15px;
  font-size: 2rem;
}

.description {
  font-size: 1.4rem;
  margin: 20px 0;
}
```
