Below is a simple HTML document and each part is explained in detail.
The first line <!DOCTYPE html> is used to indicate (to the browser) what type the document is. This declaration is given based on which version of HTML to use. For example, the above document is an HTML5 document. Thus if it were version 1.0 of XHTML, the declaration would have been given like this
It is transitional, meaning you can write all HTML in this document and use deprecated elements like the font. You cannot use a frameset.
However, replacing "xhtml1-transitional.dtd" with "xhtml1-strict.dtd" will prevent deprecated elements from being used.
** These are no longer commonly used now that HTML5 has arrived. Declaration of HTML 5 is given.
However, it is not very important. Copy and paste the HTML document at the beginning of writing. But you have to give it because if you don't provide it, some browsers don't output correctly, like Internet Explorer (IE).