---
id: 612e83ec2eca1e370f830511
title: Step 8
challengeType: 0
dashedName: step-8
---

# --description--

Add a `link` element inside your `head` element. Give it a `rel` attribute set to `stylesheet` and an `href` attribute set to `styles.css`.

# --hints--

Your code should have a `link` element.

```js
assert.isNotNull(document.querySelector('link'));
```

You should not change your existing `head` tags. Make sure you did not delete the closing tag.

```js
const headElements = document.querySelectorAll('head');
assert.strictEqual(headElements?.length, 1);
```

You should have one `link` element.

```js
assert.strictEqual(document.querySelectorAll('link')?.length, 1);
```

Your `link` element should be inside your `head` element.

```js
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
const headElementContent = code.match(headContentRegex);

const headElement = document.createElement("head");
headElement.innerHTML = headElementContent;
assert.isNotNull(headElement.querySelector('link'));
```

Your `link` element should have a `rel` attribute with the value `stylesheet`.

```js
const linkElement = document.querySelector('link');
const rel = linkElement?.getAttribute("rel");
assert.strictEqual(rel, "stylesheet");
```

Your `link` element should have an `href` attribute with the value `styles.css`.

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

# --seed--

## --seed-contents--

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    --fcc-editable-region--
    <meta charset="UTF-8" />
    <title>Piano</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    --fcc-editable-region--
  </head>
  <body>
    <div id="piano">
      <div class="keys">
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>

        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>

        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
      </div>
    </div>
  </body>
</html>
```

```css

```
