back

CodeWithRahul

More
  • Home
  • Cources
  • Tutorials
  • Tutorials
  • Projects
  • Notes
  • Contact
  • Work With Us
  • HTML
  • CSS
  • JAVASCRIPT
  • CC++
  • PHP
  • PYTHON
  • REACT JS
  • DSA

RahulGoswami.com

Create an account
  • INTRODUCTION
    • HTML Introduction
    • HTML Working
    • HTML Prerequisite
    • HTML Document
    • HTML Structure 1
    • HTML Page
    • HTML Structure 2
    • HTML Editor
    • HTML View Source
    • HTML Tags
    • HTML Element
    • VS Code
    • installation
  • HTML BASIC TAGS
    • Skeletal Tags
    • Heading Tags
    • Paragraph Tag
    • Horizontal Line Tag
    • Line Break Tag
    • Center Tag
    • Preserve
    • Formatting Tag
  • HTML FORMATTING TAGS
    • Monospaced Font
    • Text Abbreviation Tag
    • Acronym Tag
    • Text tags
  • HTML QUOTATIONS
    • Blockquote Tag
    • Quote Tag
    • Text Citation Tag
    • Text Direction Tag
    • Address Text Tag
    • Code Tag
  • HTML ATTRIBUTES
    • HTML Attributes
    • HTML Core
    • Attributes 1
    • Attributes 2
    • HTML Generic
  • HTML LINKS
    • HTML Links
  • HTML COMMENTS
    • HTML Comments
  • HTML IMAGES
    • HTML Images
  • HTML LISTS
    • HTML Lists
    • HTML Unordered List
    • HTML Ordered List
    • HTML Definition List
  • HTML TABLES
    • HTML Tables
  • HTML BLOCK ELEMENT
    • HTML Block
    • Elements
  • HTML INLINE ELEMENT
    • HTML Inline
    • Elements
  • HTML FORMS
    • FORM Introduction
    • More on forms

    HTML Document Structure

    How does an HTML document structure look?

    HTML document structure contains some set of tags. Tags are some text enclosed within <…> angle braces. A tag is like a container for either content or other HTML tags. The below text shows how the HTML document structure looks:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Document</title>
    </head>
    <body>
        <!-- Content -->
    </body>
    </html> 

    Do not be afraid. I will explain what is being represented above to you.

    Note: These are the five must-use tags for HTML
    <!DOCTYPE html>, <html>, <head>, <title>, <body>
    1. <!DOCTYPE html>

    The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. The current version is 5 i.e. HTML 5.

    2. <html>

    The <html> tag is the root of an HTML page.

    3. <head>

    The <head> tag contains page metadata.

    4. <title>Document</title>

    The <title> tag contains the title of a page and is shown in the browser title bar.

    5. </head>

    The </head> tag is closing of <head> tag.

    6. <body>

    The <body> tag is the main tag of HTML. It contains the main body of the page and is shown in the white part of the browser.

    7. </body>

    The </body>tag is closing of </body> tag.

    8. </html>

    The </html>tag is closing of </html> tag.

    Every HTML page needs at least these 8 lines to define a layout of a page. We will learn more about HTML tags in the upcoming tutorial.

    Owner of this WebPage Image

    CodeWithRahul

    Copyright © 2023 CodeWithRahul.com