freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-accessibility-by-buil.../613297a923965e0703b64796.md

57 lines
1.2 KiB
Markdown
Raw Normal View History

---
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.
Assegna alla pagina un elemento `meta` con un valore `charset` appropriato.
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--
Dovresti creare un elemento `meta` dentro l'elemento `head`.
```js
assert.exists(document.querySelector('head > meta'));
```
Dovresti assegnare al tag `meta` un attributo `charset` con il valore `UTF-8`.
```js
assert.equal(document.querySelector('head > meta')?.getAttribute('charset')?.toLowerCase(), 'utf-8');
```
# --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;
}
```