---
id: 63b6088bb56e2d1cac364043
title: Step 6
challengeType: 0
dashedName: step-6
---

# --description--

Continuing the pattern, create a `fieldset` for `dinner` with the same nested elements.

# --hints--

You should create a third `fieldset` element in your `form`.

```js
assert.exists(document.querySelectorAll('form fieldset')[2]);
```

Your third `fieldset` element should come after your second `fieldset` element.

```js
assert.equal(document.querySelectorAll('form fieldset')[2]?.previousElementSibling?.tagName, "FIELDSET");
```

Your third `fieldset` element should have an `id` set to `dinner`.

```js
assert.equal(document.querySelectorAll('form fieldset')[2]?.id, "dinner");
```

Your third `fieldset` element should contain a `legend` element.

```js
assert.exists(document.querySelectorAll('form fieldset')[2]?.querySelector('legend'));
```

Your new `legend` element should have the text `Dinner`.

```js
assert.equal(document.querySelectorAll('form fieldset')[2]?.querySelector('legend')?.innerText, "Dinner");
```

Your third `fieldset` element should contain a `div` element.

```js
assert.exists(document.querySelectorAll('form fieldset')[2]?.querySelector('div'));
```

Your new `div` element should have a `class` set to `input-container`.

```js
assert.equal(document.querySelectorAll('form fieldset')[2]?.querySelector('div')?.className, "input-container");
```

# --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" />
    <link rel="stylesheet" href="styles.css" />
    <title>Calorie Counter</title>
  </head>
  <body>
    <main>
      <h1>Calorie Counter</h1>
      <div class="container">
        <form id="calorie-counter">
          <label for="budget">Budget</label>
          <input
            type="number"
            min="0"
            id="budget"
            placeholder="Daily calorie budget"
            required
          />
          <fieldset id="breakfast">
            <legend>Breakfast</legend>
            <div class="input-container"></div>
          </fieldset>
          <fieldset id="lunch">
            <legend>Lunch</legend>
            <div class="input-container"></div>
          </fieldset>
--fcc-editable-region--

--fcc-editable-region--
        </form>
      </div>
    </main>
  </body>
</html>
```

```css
body {
  font-family: "Lato", Arial;
}

h1 {
  text-align: center;
}

.container {
  width: 90%;
  max-width: 680px;
}

h1,
.container,
.output {
  margin: 20px auto;
}

label,
legend {
  font-weight: bold;
}

.input-container {
  display: flex;
  flex-direction: column;
}

button:hover {
  cursor: pointer;
}

fieldset,
label,
button,
input,
select {
  margin-bottom: 10px;
}

.output {
  border: 2px solid black;
  padding: 10px;
  text-align: center;
}

.hide {
  display: none;
}

.output span {
  font-weight: bold;
  font-size: 1.2em;
}

.surplus {
  color: #006627;
}

.deficit {
  color: #B30000;
}
```

```js

```
