You are on | Tutorials / HTML / Structure of the HTML document
Chapter 1: HTML & web pages


Internet and world wide web
Tags in HTML
URLs in HTML
Planning and designing a website
Structure of the HTML document
Setting Document background

Chapter 2: Working with Text
Chapter 3: Working with images
Chapter 4: Audio and videos
Chapter 5: Hyperlinks
Chapter 6: Tables
Chapter 7: Forms
Chapter 8: Frames
Chapter 9: CSS
Chapter 10: HTML entities
Chapter 11: HTML colors

 

Structure of the HTML document


An HTML documents consist of different sections. Arrangement of these sections in a document is called structure of the document. All HTML documents have same structure. It consists of two main sections - The document head and the document body .

  1. The head is used for text and HTML tags that are not displayed on the page
  2. The body is used for text and tags that are displayed on the page.

The head section of the webpage contains title and Meta tags.

The < title > & </title> tag contains the title of the page. The page title is shown in the title bar of the browser window when the page is displayed.

Meta tag contains useful information about the webpage. It is the most important factor of Search Engine Optimization (SEO). SEO is the process by doing which you can make your website rank better in major search engines like Google, yahoo or Bing.

 

The head section also contains JavaScript code. JavaScript is a programming language used in more advanced HTML pages.

Finally, the head section also contains codes for cascading style sheets (CSS). CSS is a technique for defining the layout of a website.

To create a basic HTML document:

  1. Open notepad and begin a new document.
  2. Type the <HTML> tag at the top of the document. This tag marks the beginning of the HTML document. It specifies that the document to be created is and HTML document.
  3. After typing <HTML> tag, type its closing tag </HTML> too and hit ENTER key for several times.
  4. Now type <head> and </head> within the blank space.
  5. To specify a title for the document, enter <title> and </title> tags within the head tags of the document and type any phrase.
  6. Add <body> & </body> tags after the closing tag </head>. The body tag will contain the rest of the information to display on the page.
  7. Save the notepad document as .HTML document. Your HTML code document should look like this.
 

Open the document by double click, the output should be

Now we have successfully created out first HTML document, we'll continue working on the same file.

Now we'll tell you how to change the document background.