freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-intermediate-css-by-b.../60b80da8676fb3227967a731.md

72 lines
1.3 KiB
Markdown
Raw Normal View History

---
id: 60b80da8676fb3227967a731
title: Step 3
challengeType: 0
dashedName: step-3
---
# --description--
Vai avanti e collega il tuo file CSS, anche se non hai ancora scritto alcun CSS.
Aggiungi un elemento `link` con un attributo `rel` di `stylesheet` e un `href` con il valore `styles.css`.
# --hints--
Il codice dovrebbe avere un elemento `link`.
```js
assert.match(code, /<link/)
```
Dovresti avere un elemento `link` auto-concludente.
```js
assert(document.querySelectorAll('link').length === 1);
```
L'elemento `link` dovrebbe essere all'interno dell'elemento `head`.
```js
assert.exists(document.querySelector('head > link'));
```
L'elemento `link` dovrebbe avere un attributo `rel` con il valore `stylesheet`.
```js
const link_element = document.querySelector('link');
const rel = link_element.getAttribute("rel");
assert.equal(rel, "stylesheet");
```
L'elemento `link` dovrebbe avere un attributo `href` con il valore `styles.css`.
```js
const link = document.querySelector('link');
assert.equal(link.dataset.href, "styles.css");
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Picasso Painting</title>
--fcc-editable-region--
--fcc-editable-region--
</head>
<body>
</body>
</html>
```
```css
```