64 lines
1.2 KiB
Markdown
64 lines
1.2 KiB
Markdown
|
---
|
||
|
id: 60b69a66b6ddb80858c51579
|
||
|
title: Step 2
|
||
|
challengeType: 0
|
||
|
dashedName: step-2
|
||
|
---
|
||
|
|
||
|
# --description--
|
||
|
|
||
|
All'interno dell'elemento `head`, aggiungi un tag `meta` con l'attributo `charset` impostato su `utf-8`. Aggiungi anche un elemento `title` con il testo `Picasso Painting`.
|
||
|
|
||
|
# --hints--
|
||
|
|
||
|
Dovresti aggiungere solo un elemento `meta`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelectorAll('meta').length === 1);
|
||
|
```
|
||
|
|
||
|
L'elemento `meta` dovrebbe avere l'attributo `charset`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelector('meta')?.getAttribute('charset'));
|
||
|
```
|
||
|
|
||
|
L'attributo `charset` dovrebbe essere impostato su `utf-8`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelector('meta')?.getAttribute('charset')?.toLowerCase() === 'utf-8');
|
||
|
```
|
||
|
|
||
|
Dovresti aggiungere un solo elemento `title`.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelectorAll('title').length === 1);
|
||
|
```
|
||
|
|
||
|
L'elemento `title` dovrebbe avere il testo `Picasso Painting`. Fai attenzione all'ortografia e alle maiuscole/minuscole.
|
||
|
|
||
|
```js
|
||
|
assert(document.querySelector('title')?.innerText === 'Picasso Painting');
|
||
|
```
|
||
|
|
||
|
# --seed--
|
||
|
|
||
|
## --seed-contents--
|
||
|
|
||
|
```html
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
--fcc-editable-region--
|
||
|
|
||
|
--fcc-editable-region--
|
||
|
</head>
|
||
|
<body>
|
||
|
</body>
|
||
|
</html>
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
|
||
|
```
|