The file is therefore composed of the three areas DOCTYPE, head, and body, whereby the first component, which is the document type definition, must be the only one before the <html> tag. This is where you let the interpretive applications know which standard you used when creating the document – in this case, HTML5. Every browser recognizes this document type; in addition, it allows you to use both current HTML5 and older HTML codes, which is why you should use it by default, especially when learning HTML.
In the following <head> section, write down the header data if your HTML file. This includes, for example, the character encoding to be used by the browser (meta charset), the meta description (meta name="description"), and the title of the web page (title) that appears in the browser header. In addition, you can make countless other meta statements, even the information included in our example is optional, but you’re recommended to leave it in for a good search engine evaluation. One exception is the <title> information, which, in addition to the document type definition, is the only mandatory element of an HTML page. In the header, you can later add the link to your CSS file, which structured the website’s design. The <body> section contains everything that is to be displayed to the user in their browser.
Note: the tags for the HTML basic structure are optional and can theoretically be omitted. In this case, the browser automatically creates the tags <html>, <head>, and <body> and assigns the appropriate elements to them. It is, however, customary to write this information yourself. In addition, the breakdown makes the document easier to read, which is especially beneficial for HTML beginners.