1.6 KiB
1.6 KiB
id | title | challengeType | dashedName |
---|---|---|---|
615f34ecc1091b4fd5a8a484 | Passo 4 | 0 | step-4 |
--description--
Dentro do elemento head
, adicione o elemento link
com o atributo rel
definido como stylesheet
e o atributo href
definido como https://fonts.googleapis.com/css?family=Open+Sans:400,700,800
.
Isto importará a família de fontes Open Sans
, com os valores de peso da fonte 400
, 700
, e 800
.
Adicione também um elemento link
para vincular o arquivo styles.css
.
--hints--
Você deve ter dois elementos link
.
assert(code.match(/<link/g)?.length === 2);
Ambos os elementos link
devem ter o atributo rel
definido como stylesheet
.
assert(code.match(/<link[\s\S]*?rel=('|"|`)stylesheet\1/)?.length === 2);
Um dos elementos link
deve ter o atributo href
definido como ./styles.css
.
assert(code.match(/<link[\s\S]*?href=('|"|`)(\.\/)?styles\.css\1/g)?.length === 1);
Um dos elementos link
deve ter o atributo href
definido como https://fonts.googleapis.com/css?family=Open+Sans:400,700,800
.
const links = [...document.querySelectorAll('link')]
assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
--seed--
--seed-contents--
--fcc-editable-region--
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Nutrition Label</title>
</head>
<body>
<h1>Nutrition Facts</h1>
<p>8 servings per container</p>
<p>Serving size 2/3 cup (55g)</p>
</body>
</html>
--fcc-editable-region--