HTML Document Structure

html.jpg image

An HTML documents are built on key elements that define a page’s structure. Although every HTML page differs in content and layout, the underlying structure remains the same. Understanding the basic structure of a document can help you understand how to build and improve your own HTML page.

Key Elements of an HTML Document
Basic HTML Tags
Syntax Description
<HTML>...</HTML> Defines an HTML document
<HEAD>...</HEAD> Defines infomration about the document
<TITLE>...</TITLE> Defines the title of a document
<BODY>...</BODY> Defines a document's body

Understanding HTML Document Structure:

  1. HTML Element
  2. Document Header
  3. Title
  4. Body

HTML Element

The <HTML> and </HTML> tags are the main tags used to identify an HTML document. An HTML element is everything from the start tag to the end tag: The start tag is often called the opening tag. The end tag is often called the closing tag. When a browser encounters these tags, it knows that anything within the two tags is part of an HTML document

Document Header

You can use the document header to add basic information about your page. The document header tags, <HEAD> and </HEAD>, follow the <HTML> opening tag. You can use the document header to include title information, metadata and base and script elements.< /P>

Title

You can add a title to your document header to help others identify your page. For example, if you are building a Web page for a business, your company name is a good page title. Web browsers, display the title in the browser window’s title bar. You can use the <TITLE> and </TITLE> tags to define a page title For best results, keep the title brief and to the point.

Body

The content of your page, including paragraphs, lists, and images, appears within the body of your HTML document.The body of the document is identified by the <BODY> and </BODY> tags. Anything you place between these tags appears on the document and in the browser window. The body of the document includes blocks of texts, headings, lists, tables, images and forms.