2020-09-03 19:12:42 -07:00
---
id: 5f3477cb2e27333b1ab2b955
2021-10-21 10:07:52 -07:00
title: Step 17
2020-09-03 19:12:42 -07:00
challengeType: 0
2021-10-21 10:07:52 -07:00
dashedName: step-17
2020-09-03 19:12:42 -07:00
---
2020-11-27 19:02:05 +01:00
# --description--
2020-09-03 19:12:42 -07:00
2021-07-21 12:03:09 -07:00
Now you need to link the `styles.css` file so the styles will be applied again. Nest a self-closing `link` element in the `head` element. Give it a `rel` attribute value `stylesheet` , a `type` attribute value of `text/css` , and an `href` attribute value of `styles.css` .
2020-09-03 19:12:42 -07:00
2020-11-27 19:02:05 +01:00
# --hints--
2020-09-03 19:12:42 -07:00
2021-07-21 12:03:09 -07:00
Your code should have a `link` element.
2020-09-03 19:12:42 -07:00
2020-11-27 19:02:05 +01:00
```js
2021-07-21 12:03:09 -07:00
// link is removed -> if exists, replaced with style
const link = document.querySelector('body > style');
assert(link);
```
You should not change your existing `head` element. Make sure you did not delete the closing tag.
```js
assert($('head').length === 1);
```
Your `link` element should be a self-closing element.
```js
2022-02-10 18:43:24 -06:00
assert(code.match(/< link [ \w\W\s]+ \/? > /i));
2021-07-21 12:03:09 -07:00
```
Your `link` element should be within your `head` element.
```js
2022-02-10 18:43:24 -06:00
assert(code.match(/< head > [\w\W\s]*< link [ \w\W\s]* \/? > [\w\W\s]*< \/head > /i))
2021-07-21 12:03:09 -07:00
```
Your `link` element should have a `rel` attribute with the value `stylesheet` .
```js
assert(code.match(/rel=('|")stylesheet\1/i));
```
Your `link` element should have a `type` attribute with the value `text/css` .
2020-09-03 19:12:42 -07:00
2021-07-21 12:03:09 -07:00
```js
assert(code.match(/type=('|")text\/css\1/i));
```
Your `link` element should have an `href` attribute with the value `styles.css` .
```js
assert(code.match(/href=('|")styles.css\1/i));
2020-09-03 19:12:42 -07:00
```
2020-11-27 19:02:05 +01:00
# --seed--
2020-09-03 19:12:42 -07:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2020-09-03 19:12:42 -07:00
```html
<!DOCTYPE html>
< html >
2020-11-27 19:02:05 +01:00
--fcc-editable-region--
2020-09-03 19:12:42 -07:00
< head >
< meta charset = "utf-8" / >
2022-03-14 15:54:43 +00:00
< title > Cafe Menu< / title >
2020-09-03 19:12:42 -07:00
< / head >
2020-11-27 19:02:05 +01:00
--fcc-editable-region--
2020-09-03 19:12:42 -07:00
< body >
< header >
< h1 > CAMPER CAFE< / h1 >
< p > Est. 2020< / p >
< / header >
< main >
< section >
2021-07-21 12:03:09 -07:00
< h2 > Coffee< / h2 >
2020-09-03 19:12:42 -07:00
< / section >
< / main >
< / body >
< html >
```
```css
h1, h2, p {
text-align: center;
}
```