---
id: 61696ef7ac756c829f9e4048
title: Step 2
challengeType: 0
dashedName: step-2
---

# --description--

In this project you'll work with an external CSS file to style the page. A `styles.css` file has been already created for you. But before you can use it, you'll need to link it to the page.

Nest a `link` element within the `head` element. Give it a `rel` attribute set to `"stylesheet"` and an `href` attribute set to `"styles.css"`.

# --hints--

You should have one `link` element.

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

Your `link` element should be a void element, it should not have a closing tag `</link>`.

```js
assert.notMatch(code, /<\/link>/i);
```

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

```js
const linkElement = document.querySelector('link');
const rel = linkElement?.getAttribute("rel")?.toLowerCase();
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");
```

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

```js
const linkElementRegex = /<head\s*>(?:.|\r|\n)*?<link(?:.|\r|\n)*?<\/head\s*>/i;
assert.match(code, linkElementRegex);
```

# --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>Colored Markers</title>
  --fcc-editable-region--
    
  --fcc-editable-region--
  </head>
  <body>
    <h1>CSS Color Markers</h1>
  </body>
</html>
```

```css

```
