64 lines
1.3 KiB
Markdown
64 lines
1.3 KiB
Markdown
![]() |
---
|
||
|
id: 6133acc353338c0bba9cb553
|
||
|
title: Etapa 5
|
||
|
challengeType: 0
|
||
|
dashedName: step-5
|
||
|
---
|
||
|
|
||
|
# --description--
|
||
|
|
||
|
Por fim, em `head`, o elemento `title` é útil para que os leitores de tela entendam o conteúdo de uma página. Além disso, ele é uma parte importante para a _SEO_.
|
||
|
|
||
|
Dê à sua página um `title` que seja descritivo e conciso.
|
||
|
|
||
|
# --hints--
|
||
|
|
||
|
Você deve adicionar um elemento `title` à `head`.
|
||
|
|
||
|
```js
|
||
|
assert.exists(document.querySelector('head > title'));
|
||
|
```
|
||
|
|
||
|
Você não deve permitir que o `title` seja maior do que 60 caracteres.
|
||
|
|
||
|
```js
|
||
|
assert.isAtMost(document.querySelector('head > title')?.textContent?.length, 60);
|
||
|
```
|
||
|
|
||
|
Tente ser mais descritivo com o elemento `title`. _Dica: use ao menos 15 caracteres_
|
||
|
|
||
|
```js
|
||
|
assert.isAtLeast(document.querySelector('head > title')?.textContent?.length, 15);
|
||
|
```
|
||
|
|
||
|
# --seed--
|
||
|
|
||
|
## --seed-contents--
|
||
|
|
||
|
```html
|
||
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
--fcc-editable-region--
|
||
|
<head>
|
||
|
<meta charset="UTF-8" />
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
|
||
|
<link rel="stylesheet" href="styles.css" />
|
||
|
</head>
|
||
|
--fcc-editable-region--
|
||
|
<body>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
body {
|
||
|
background: #f5f6f7;
|
||
|
color: #1b1b32;
|
||
|
font-family: Helvetica;
|
||
|
margin: 0;
|
||
|
}
|
||
|
```
|