Working time:Monday - Saturday: 07 AM - 06 PM

Find us:Sonda East, Deoria, UP, India

Structure of HTML

A basic page of HTML page is a web document that normally has a file extension .html or .htm . All HTML documents follow same basic structure so that the browser that renders the file knows what to do.

HTML document has two main parts:

  1. HEAD: The head element contains title and Meta data of a web document.
  2. BODY: The body element contains the information that you want to display on a web page.


The first line of code in a HTML document is DOCTYPE HTML also known as doctype declaration. It tells the browser in which version of HTML the page is written in.

HTML tag

HTML tag tells the browser that this is an HTML document. It is the root of an HTML document. HTML tag is the container for all the other HTML elements.

Head tag

Head tag is used to put information about the page.

Title tag

Title tag is used to provide information to show in the title bar of a browser.

Body tag

Body tag is used to display the content of a web page. Content written in the body tag is visible on the web page.

h1 tag

h1 tag is used to write headings in a web page. As you have headings in a book similarly there are headings in a web page.

p tag

Paragraph tag is used to write a paragraph in a web page.

Elements of HTML