Back to Freecodecamp

Step 1

curriculum/challenges/english/blocks/learn-intermediate-css-by-building-a-cat-painting/646c47867800472a4ed5d2ea.md

latest1.4 KB
Original Source

--description--

Begin with the basic HTML structure. Add a DOCTYPE reference of html and an html element with its lang attribute set to en. Also, add a head and a body element within the html element.

--hints--

You should have the DOCTYPE declaration of html.

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

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

js
assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/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));

You should have a closing html tag.

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

You should have an opening head tag.

js
assert(code.match(/<head>/i));

You should have a closing head tag.

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

You should have an opening body tag.

js
assert(code.match(/<body>/i));

You should have a closing body tag.

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

Your body element should come after the head element.

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

Your head and body elements should be inside the html element.

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

--seed--

--seed-contents--

html
--fcc-editable-region--

--fcc-editable-region--