freeCodeCamp/curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-003.md

1.1 KiB

id title challengeType dashedName
5d822fd413a79914d39e98cb Part 3 0 part-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--