Above is the HTML for an incredibly simple webpage. So simple in fact that all it does is display "Hello world!" in the web browser. However, this is the basic frame of how websites are created.
The first line of any HTML webpage must be <!DOCTYPE html>. This isn't HTML, it is a document type declaration. It is there simply to tell the web browser what version of HTML the webpage is written in. The above is the DOCTYPE for HTML5, the latest version.
Line 2 is the HTML opening tag. All of our HTML code must be within this tag and its closing tag and again, it is mandatory to have in a HTML document.
Line 3 contains the head opening tag. The head tag isn't where content for the website is put. Instead, it can contain other interesting elements such as scripts and style sheets.
More importantly, as you can see it is where we can use the <title> opening tag. Anything put between the opening and closing title tag is displayed across the taskbar of the user's computer and also across the top of web browsers and in tabs.
In line 7, we see the body opening tag. Between this and the closing tag, we put all of the content we want to be displayed on the website. This is where the main chunk of HTML will be put.
Line 8 has a <p> element which we discovered earlier. <p> elements are used to contain paragraphs and they automatically put space before and after the text in the element.