58 lines
1.4 KiB
Markdown
58 lines
1.4 KiB
Markdown
|
---
|
||
|
id: 60b69a66b6ddb80858c5157a
|
||
|
title: Step 4
|
||
|
challengeType: 0
|
||
|
dashedName: step-4
|
||
|
---
|
||
|
|
||
|
# --description--
|
||
|
|
||
|
FontAwesome è una biblioteca di icone SVG, molte delle quali possono essere usate gratuitamente. Utilizzerai alcune di queste icone in questo progetto, quindi ti servirà il link a un foglio di stile esterno al tuo HTML.
|
||
|
|
||
|
Aggiungi un elemento `link` con un `rel` di `stylesheet` e un `href` con il valore `https://use.fontawesome.com/releases/v5.8.2/css/all.css`.
|
||
|
|
||
|
# --hints--
|
||
|
|
||
|
Dovresti aggiungere un altro elemento `link`.
|
||
|
|
||
|
```js
|
||
|
// We set this to 1 because the CSS link is stripped from the code by our parser.
|
||
|
assert(document.querySelectorAll('link').length === 1);
|
||
|
```
|
||
|
|
||
|
L'elemento `link` dovrebbe avere un `rel` con il valore `stylesheet`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelector('link')?.getAttribute('rel') === 'stylesheet');
|
||
|
```
|
||
|
|
||
|
L'elemento `link` dovrebbe avere un `href` con il valore `https://use.fontawesome.com/releases/v5.8.2/css/all.css`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelectorAll('link')?.[0]?.getAttribute('href') === 'https://use.fontawesome.com/releases/v5.8.2/css/all.css')
|
||
|
```
|
||
|
|
||
|
# --seed--
|
||
|
|
||
|
## --seed-contents--
|
||
|
|
||
|
```html
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<title>Picasso Painting</title>
|
||
|
<link rel="stylesheet" type="text/css" href="./styles.css" />
|
||
|
--fcc-editable-region--
|
||
|
|
||
|
--fcc-editable-region--
|
||
|
</head>
|
||
|
<body>
|
||
|
</body>
|
||
|
</html>
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
|
||
|
```
|