2022-04-05 11:21:38 +00:00
---
id: 613297a923965e0703b64796
title: Step 2
challengeType: 0
dashedName: step-2
---
# --description--
Potresti già avere familiarità con l'elemento `meta` ; viene utilizzato per specificare informazioni sulla pagina, come titolo, descrizione, parole chiave e autore.
2022-05-30 16:25:46 +00:00
Assegna alla pagina un elemento `meta` con un valore `charset` appropriato.
2022-04-05 11:21:38 +00:00
L'attributo `charset` specifica la codifica dei caratteri della pagina, e al giorno d'oggi `UTF-8` è l'unica codifica supportata dalla maggior parte dei browser.
# --hints--
2022-05-30 16:25:46 +00:00
Dovresti creare un elemento `meta` dentro l'elemento `head` .
2022-04-05 11:21:38 +00:00
```js
assert.exists(document.querySelector('head > meta'));
```
2022-05-30 16:25:46 +00:00
Dovresti assegnare al tag `meta` un attributo `charset` con il valore `UTF-8` .
2022-04-05 11:21:38 +00:00
```js
2022-05-30 16:25:46 +00:00
assert.equal(document.querySelector('head > meta')?.getAttribute('charset')?.toLowerCase(), 'utf-8');
2022-04-05 11:21:38 +00:00
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
< html lang = "en" >
--fcc-editable-region--
< head >
< link rel = "stylesheet" href = "styles.css" / >
< / head >
--fcc-editable-region--
< body >
< / body >
< / html >
```
```css
body {
background: #f5f6f7 ;
color: #1b1b32 ;
font-family: Helvetica;
margin: 0;
}
```