Basic structure of an HTML document

Structure of an HTML document

Most HTML tags come in pairs which define the content within them. HTML refers to these as container tags. An HTML document’s basic structure is really just a series of large containers, inside of which you define the two main sections of your page: the document head and the document body.

Open your text editor and begin a new blank document.

Type this tag – <html> at the top of the document.

This tag begins the document’s primary container. It defines the type of document you’re creating: an HTML document.

This opening <html> tag requires a closing tag, so hit Enter (or Return) twice to move down a few lines and then enter the closing tag, </html>. Your document should appear like this:

<html>
</html>

Now, place your cursor between the opening and closing tag. Type the tag <head>, which defines the head section of the document.Now, your document should look like this

<html>
<head>
</head>
</html>

To add a title of HTML document. enter <title> and </title> between the head tags of your document. Fo example, <title>Free learning for beginners </title>

<html>
<head>
<title> Free learning for beginners </title>
</head>
</html>

To add body section in your page, between the closing </head> and closing </html> tag, enter opening and closing body tags. You document should look like below

<html>
<head>
<title Free learning for beginners </title>
</head>
<body>
</body>
</html>

Save your document. You can give it a name like first.html and then use it each time you want to start a new document by opening it, making changes, and resaving the file with a different name.