Navratri Sale: Get Upto 30% OFF on Live Training! Offer Ending in
D
H
M
S
Get Now

HTML Page Structure

Level : Beginner
Mentor: Shailendra Chauhan
Duration : 00:03:00

Document Type Declaration

The document type declaration (DOCTYPE) specifies the version of HTML that the document follows. It is placed at the beginning of an HTML document and helps browsers understand how to interpret the code.

Example

<!DOCTYPE html>
<html>
  <!-- HTML content goes here -->
</html>

HTML (HTML) Element

The HTML element is the root element of an HTML document. It serves as the container that holds all other elements within the document. It indicates that the document is an HTML file and provides the structure for organizing content.

Example

<!DOCTYPE html>
<html>
  <!-- content goes here -->
</html>

Head (head) Element

The head element is used to define the metadata of an HTML document. It includes information such as the document's title, character encoding, links to external resources like CSS stylesheets, and other important data that isn't directly displayed on the webpage.

Example

<head>
  <title>My Webpage</title>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="styles.css">
</head>

Title (title) Element

The title element specifies the title of the HTML document, which appears in the browser's title bar or tab. It is crucial for search engine optimization (SEO) and helps users identify the page's content.

Example

<head>
  <title>My Awesome Website</title>
</head>

Body (body) Element

The body element contains the visible content of an HTML document, such as text, images, videos, and other elements. It represents the main content area of the webpage.

Example

<body>
  <h1>Welcome to my website!</h1>
  <p>This is the main content of the page.</p>
</body>

HTML Document Structure

An HTML document follows a specific structure with the DOCTYPE declaration, html element, head element, and body element. It organizes the content and provides essential information for browsers to render the webpage correctly.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>My Webpage</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
  </body>
</html>
Self-paced Membership
  • 24+ Video Courses
  • 825+ Hands-On Labs
  • 400+ Quick Notes
  • 125+ Skill Tests
  • 10+ Interview Q&A Courses
  • 10+ Real-world Projects
  • Career Coaching Sessions
  • Email Support
Upto 60% OFF
Know More
Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this