Structure of HTML Document

Structure of HTML Document


In this article we are going to explain the structure of html document. Means the basic structure of the html document is how looks behind the web page. HTML is a markup language and uses various tags to format the content. The entire web page is enclosed within <HTML> </HTML> tags. Within these tags there are two distinct sections are created using the  <HEAD> </HEAD> tags and the <BODY></BODY> tags. 

The basic structure of html document is followed as below.

<HTML>
             <HEAD>
                          <TITLE>
                          Title of the page.
                          </TITLE>
             </HEAD>

             <BODY>
                  Content of the Page.
             </BODY>
</HTML>

The various parts of HTML documents are as follows :-

  • HTML Tag:-

    This tag comes after the <! DOCTYPE> tag and identifies the document as an HTML document. This tag is optional and even if it is not explicitly included, most browser assume its existence. But it is good practice to include this tag. The <HTML> tag identifies the document as an HTML document. An HTML document begins with <HTML> and ends with </HTML>.
  • HEAD Tag :-

    The <HEAD> tag contains information about the document, including its title, scripts used, style definition and document description. The portion enclosed between the <HEAD> and </HEAD> tags is called the header. The header of a document is where global settings are defined.
  • TITLE Tag :-

    The <TITLE> tag contains the document title. Text included b/w the <TITLE>……….</TITLE> tag shows up in the title bar of the browser window. The title does not appears within the browser window, since it is visible in the browser's title bar. Only one title is allowed per page.
  • BODY Tag :-

    This tag encloses all tags, attributes and information that one wants the browser to display. To use the <BODY> tag, enter it below the closing </HEAD> tag and above the closing </HTML> tag. In the <BODY> tag it includes the main content of the page like paragraphs, headings, images, video clips, audio clips and etc.

When an HTML document is complete with all structure tags. It can be saved in notepad by selecting the save as option from the file menu and saving the document with html extension like .html, .htm are the extension of the HTML. 

In this article we have learn the structure of html document. In the next upcoming articles we learn about how to create and save the html document.

The article on structure of html document is help full for you then drop a comment on a comment section below and do share with your friends.

Comments