freeCodeCamp Challenge Guide: Declare the Doctype of an HTML Document

Declare the Doctype of an HTML Document


Problem Explanation

The declaration of the Doctype must be in the first line since it gives instructions to the browser on how to interpret the following lines of code.

It might be followed by a <html> element, even if is not mandatory; this is the root element of the document and if you do not write it most of the browser will infer it. However, it’s a good practice to write it explicitly.

All your html elements must be nested inside the <html> one: in this challenge you are asked to use a <h1> element with content of your choice.

Good luck!

6 Likes