curriculum/challenges/english/blocks/learn-basic-css-by-building-a-cafe-menu/5f344f9c805cd193c33d829c.md
You can add style to an element by specifying it in the style element and setting a property for it like this:
element {
property: value;
}
Center the content of the h1 element by setting its text-align property to the value center.
You should have an h1 selector in your style element.
const hasSelector = new __helpers.CSSHelp(document).getStyle('h1');
assert(hasSelector);
Your text-align property should have a value of center.
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.
const h1TextAlign = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('text-align');
assert(h1TextAlign === 'center');
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
--fcc-editable-region--
<style>
</style>
--fcc-editable-region--
</head>
<body>
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
</html>