1.5 KiB
1.5 KiB
id, title, challengeType, dashedName
id | title | challengeType | dashedName |
---|---|---|---|
61329d52e5010e08d9b9d66b | Step 4 | 0 | step-4 |
--description--
Un altro elemento meta
importante per l'accessibilità e la SEO è la definizione description
. Il valore dell'attributo content
è usato dai motori di ricerca per dare una descrizione della tua pagina.
Aggiungi un elemento meta
con l'attributo name
impostato a description
, e dagli un attributo content
utile.
--hints--
Dovresti aggiungere un nuovo elemento meta
a head
.
assert.equal(document.querySelectorAll('meta').length, 3);
Dovresti dare a meta
un attributo name
con valore di description
.
assert.exists(document.querySelector('meta[name="description"]'));
Dovresti dare a meta
un attributo content
.
assert.notEmpty(document.querySelector('meta[name="description"]')?.content);
Il valore dell'attributo content
non deve superare una lunghezza di 165 caratteri. Questa è la lunghezza massima della descrizione permessa da Google.
assert.isAtMost(document.querySelector('meta[name="description"]')?.content?.length, 165);
--seed--
--seed-contents--
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css" />
</head>
--fcc-editable-region--
<body>
</body>
</html>
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}