Html Document Structure

The HTML document basic structure contains Doctype, html tag, head tag & body tag. These are necessory thing in HTML. All HTML document must start with <!DOCTYPE html>. After <!DOCTYPE html> the <html> tag comes that hold head and body tags. We must use <head> tag just after <html> tag. The head tag must include <title> tag for adding title on browser's tab and meta viewport tag for responsive design. After <head> tag the body start just after closing of </head> tag and it contains all visible part of HTML document.  

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Welcome To R3coders</title>
</head>
<body>
     <h1>Welcome to r3coders youtube channel, A web development journey. </h1>
</body>
</html>

 

Explanation

 

  1. <!DOCTYPE html>: This is starting tag of HTML document and it define that the document type is HTML. 
  2. <html lang="en">: It is the root element of the HTML document and It comes after <!DOCTYPE html>  and it wrap <head> and <body> tags of HTML document. 
  3. <head>: It comes after <html> tag and it contains <titlte> tag, <meta> tag, <link> tags, <script> tags. 
  4. <body>: The <body> tag comes after <head> tag and it hold all visible part of HMTL  document.