HTML Page Structure

HTML Page Structure:HTML (Hypertext Markup Language) structures web pages with elements organized hierarchically. At its core, a page begins with the <html> tag, enclosing the <head> and <body> sections. The <head> contains metadata like the title and links to external resources. The <body> holds the visible content, built using elements such as <header>, <nav>, <main>, and <footer>. Text, images, and links are placed within appropriate tags like <p>, <img>, and <a>. Lists (<ul>, <ol>) and tables (<table>) organize data. Nesting elements creates a logical structure. This markup defines content, ensuring proper display and accessibility across browsers, facilitating web communication, and aiding in search engine optimization.

Profile Photo

Abhishek Yadav (SD) SDE of FAI

Feedback

written
Profile Photo

Anil Kumar (Expert) Coding Expert of FAI

Feeback

reviewed
Profile Photo
Sep 20, 2023 03:09 AM Last Updated
updated

What is the basic structure of an HTML page, and what are the essential elements that make up this structure?

This is a basic HTML structure that includes the essential elements of an HTML document:

  1. <!DOCTYPE html>: This declaration specifies that the document is an HTML5 document.

  2. <html>: The root element that contains all other HTML elements on the page.

  3. <head>: The head section of the HTML document, which typically includes metadata like character encoding, the title of the page, and links to external resources like stylesheets and scripts.

  4. <meta charset="UTF-8">: Specifies the character encoding for the document. UTF-8 is widely used and supports many characters from different languages.

  5. <title>: Sets the title of the web page, which appears in the browser's title bar or tab.

  6. <body>: The body of the HTML document, where the visible content of the webpage is placed.

  7. <header>: Often contains the website's heading and navigation elements.

  8. <main>: Contains the main content of the page, such as sections and articles.

  9. <section>: Represents a thematic grouping of content.

  10. <h1>, <h2>, <p>, and other elements: These are used to structure and format the content within the sections.

  11. <footer>: Contains information about the author, copyright, or other footer-related content.

HTML Page Structure Example

Copied to Clipboard
Run

Output of HTML Page Structure

Ad