Back to Freecodecamp

Step 2

curriculum/challenges/english/blocks/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ca.md

latest940 B
Original Source

--description--

Add opening and closing html tags below the DOCTYPE so you have a place to start putting some code. Be sure to set the language to English.

--hints--

Your DOCTYPE declaration should be at the beginning of your HTML.

js
assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));

Your html element should have an opening tag, and lang attribute with value of en.

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

Your html element should have a closing tag.

js
assert(code.match(/<\/html\s*>/));

Your html tags should be in the correct order.

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

You should only have one html element.

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

--seed--

--seed-contents--

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

--fcc-editable-region--