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

1.7 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
5f3477ae9675db8bb7655b30 Step 13 0 step-13

--description--

In the previous step, you used a type selector to style the h1 element. Go ahead and center the h2 and p elements with a new type selector for each one.

--hints--

You should not change the existing h1 selector.

const hasH1 = new __helpers.CSSHelp(document).getStyle('h1');
assert(hasH1);

You should add a new h2 selector.

const hasH2 = new __helpers.CSSHelp(document).getStyle('h2');
assert(hasH2);

You should add a new p selector.

const hasP = new __helpers.CSSHelp(document).getStyle('p');
assert(hasP);

Your h1 element should have a text-align of center.

const h1TextAlign = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('text-align');
assert(h1TextAlign === 'center');

Your h2 element should have a text-align of center.

const h2TextAlign = new __helpers.CSSHelp(document).getStyle('h2')?.getPropertyValue('text-align');
assert(h2TextAlign === 'center');

Your p element should have a text-align of center.

const pTextAlign = new __helpers.CSSHelp(document).getStyle('p')?.getPropertyValue('text-align');
assert(pTextAlign === 'center');

--seed--

--seed-contents--

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
--fcc-editable-region--
    <style>
      h1 {
        text-align: center;
      }
    </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>