Back to Freecodecamp

Step 1

curriculum/challenges/english/blocks/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad6996a.md

latest1021 B
Original Source

--description--

By now, you should be familiar with the basic elements an HTML page should have.

Set up your code with a DOCTYPE declaration, an html element with the language set to English, a head element, and a body element.

--hints--

Your code should have a <!DOCTYPE html> declaration.

js
assert(code.match(/<!DOCTYPE html>/i));

You should have an opening <html> tag with a lang attribute of en.

js
assert(code.match(/<html\s+lang\s*=\s*('|")en\1\s*>/gi));

Your code should have a head element within the html element.

js
assert(document.querySelectorAll('head').length === 1);

Your code should have a body element within the html element.

js
assert(document.querySelectorAll('body').length === 1);

Your head element should come before your body element.

js
assert(document.querySelector('body').previousElementSibling.tagName === 'HEAD');

--seed--

--seed-contents--

html
--fcc-editable-region--

--fcc-editable-region--