Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML Course | Structure of an HTML Document

  • Difficulty Level : Easy
  • Last Updated : 19 May, 2022

Course Navigation 

The <HTML> is a markup language that is used by the browser to manipulate text, images, and other content to display it in the required format.
Tags in HTML: Tags are one of the most important part in an HTML Document. HTML uses some predefined tags which tells the browser about content display property, that is how to display a particular given content. For Example, to create a paragraph, one must use the paragraph tags(<p> </p>) and to insert an image one must use the img tags (<img />). 
There are generally two types of tags in HTML: 

  1. Paired Tags: These tags come in pairs. That is they have both opening(< >) and closing(</ >) tags.
  2. Empty Tags: These tags do not require to be closed.

Below is an example of (<b>) tag in HTML, which tells the browser to bold the text inside it. 


Structure of an HTML Document

An HTML Document is mainly divided into two parts: 

  • HEAD: This contains the information about the HTML document. For Example, Title of the page, version of HTML, Meta Data etc.
  • BODY: This contains everything you want to display on the Web Page.

HTML Document Structure

Let us now have a look at the basic structure of HTML. That is the code that is a must for every webpage to have: 


<!DOCTYPE html>

Every Webpage must contain this code. Below is the complete explanation of each of the tag used in the above piece of HTML code:
<!DOCTYPE html>: This tag is used to tells the HTML version. This currently tells that the version is HTML 5.
<html>: This is called HTML root element and used to wrap all the code.
<head>: Head tag contains metadata, title, page CSS etc. All the HTML elements that can be used inside the <head> element are: 

  • <style>
  • <title>
  • <base>
  • <noscript>
  • <script>
  • <meta>

<body>: Body tag is used to enclose all the data which a web page has from texts to links. All the content that you see rendered in the browser is contained within this element. 
To learn more about an HTML Document structure, please visit

HTML is the foundation of webpages, is used for webpage development by structuring websites and web apps.You can learn HTML from the ground up by following this HTML Tutorial and HTML Examples.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!