Files
freeCodeCamp/curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/step-003.md
Nicholas Carrigan (he/him) b36cdbafd1 chore: rename "part" to "step" (#43934)
* chore: rename part to step

* chore: update metas

* chore: more renaming

* chore: update tooling

* chore: update frontmatter

* chore(tools): title testing
2021-10-21 18:07:52 +01:00

1.1 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
5d822fd413a79914d39e98cb Step 3 0 step-3

--description--

Next, add opening and closing head and body tags within the html element.

--hints--

You should have an opening head tag.

assert(code.match(/<head\s*>/i));

You should have a closing head tag.

assert(code.match(/<\/head\s*>/i));

You should have an opening body tag.

assert(code.match(/<body\s*>/i));

You should have a closing body tag.

assert(code.match(/<\/body\s*>/i));

The head and body elements should be siblings.

assert(document.querySelector('head').nextElementSibling.localName === 'body');

The head element should be within the html element.

assert([...document.querySelector('html').children].some(x => x.localName === 'head'));

The body element should be within the html element.

assert([...document.querySelector('html').children].some(x => x.localName === 'body'));

--seed--

--seed-contents--

<!DOCTYPE html>
--fcc-editable-region--
<html>
  
</html>
--fcc-editable-region--