Back to Freecodecamp

Step 2

curriculum/challenges/english/blocks/learn-html-forms-by-building-a-registration-form/60f027099a15b00485563dd2.md

latest980 B
Original Source

--description--

Below the DOCTYPE, add an html element with a lang attribute set to en, so that you have a place to start putting some code.

--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
// Possibly a redundant test, as browser fixes this
assert(document.querySelectorAll('html').length === 1);

--seed--

--seed-contents--

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

--fcc-editable-region--