Files
Shaun Hamilton 25aa04e2e7 chore(curriculum): standardise titles for rwd-beta (#45398)
* chore(curriculum): accessibility-quiz

* chore(curriculum): cafe-menu

* chore(curriculum): ferris-wheel

* chore(curriculum): fix ferris-wheel tests

* chore(curriculum): colored-markers

* chore(curriculum): photo-gallery

* chore(curriculum): magazine

* chore(curriculum): penguin

* chore(curriculum): city-skyline

* chore(curriculum): registration-form

* chore(curriculum): picasso-painting

* chore(curriculum): balance-sheet

* chore(curriculum): piano

* chore(curriculum): rothko-painting

* fix: title min 15 chars
2022-03-14 16:54:43 +01:00

65 lines
1.4 KiB
Markdown

---
id: 612e77aba7ca691f598feb02
title: Step 2
challengeType: 0
dashedName: step-2
---
# --description--
Add two `meta` tags, one to optimize your page for mobile devices, and one to specify an accepted `charset` for the page.
# --hints--
You should add two `meta` elements to your page.
```js
const meta = document.querySelector('meta');
assert.exists(meta);
```
You should have two `meta` elements.
```js
const meta = document.querySelectorAll('meta');
assert(meta?.length === 2);
```
One `meta` element should have a `name` set to `viewport`, and `content` set to `width=device-width, initial-scale=1.0`.
```js
const meta = [...document.querySelectorAll('meta')];
const target = meta?.find(m => m?.getAttribute('name') === 'viewport' && m?.getAttribute('content') === 'width=device-width, initial-scale=1.0' && !m?.getAttribute('charset'));
assert.exists(target);
```
The other `meta` element should have the `charset` attribute set to `UTF-8`.
```js
const meta = [...document.querySelectorAll('meta')];
const target = meta?.find(m => !m?.getAttribute('name') && !m?.getAttribute('content') && m?.getAttribute('charset') === 'UTF-8');
assert.exists(target);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<title>Piano</title>
--fcc-editable-region--
--fcc-editable-region--
</head>
<body></body>
</html>
```
```css
```