A web browser must know what language a document is written in before they can process the contents of the document.
You can let web browsers know that you are using the HTML language by starting your HTML document with a document type declaration.
The declaration is the following:
This declaration is an instruction. It tells the browser what type of document to expect, along with what version of HTML is being used in the document.
<!DOCTYPE html>must be the first line of code in all of your HTML documents.
Note: If you don't use the doctype declaration, your HTML code will likely still work, however, it's risky. Right now, the browser will correctly assume that you are using HTML5, as HTML5 is the current standard. In the future, however, a new standard will override HTML5. Future browsers may assume you're using a different, newer standard, in which case your document will be interpreted incorrectly. To make sure your document is forever interpreted correctly, always include
<!DOCTYPE html> at the very beginning of your HTML documents.