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

72 lines
1.3 KiB
Markdown

---
id: 5f344f9c805cd193c33d829c
title: Step 12
challengeType: 0
dashedName: step-12
---
# --description--
You can add style to an element by specifying it in the `style` element and setting a property for it like this:
```css
element {
property: value;
}
```
Center your `h1` element by setting its `text-align` property to the value `center`.
# --hints--
You should have an `h1` selector in your `style` element.
```js
const hasSelector = new __helpers.CSSHelp(document).getStyle('h1');
assert(hasSelector);
```
Your `text-align` property should set a value of `center`.
```js
const hasTextAlign = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['text-align'] === 'center');
assert(hasTextAlign);
```
Your `h1` selector should set the `text-align` property to `center`.
```js
const h1TextAlign = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('text-align');
assert(h1TextAlign === 'center');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
--fcc-editable-region--
<style>
</style>
--fcc-editable-region--
</head>
<body>
<header>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
</header>
<main>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
<html>
```