Explain the Basic Structure of HTML Document?


Every HTML document is divided into two parts:
  •       Head section
  •       Body section

Head section contains control information used by the browser.
Anything written in the head section doesn’t shown in the page. It is optional section.
Head section contains <title> tag.

The body contains the content that displays on the screen. We use tags which controls the content       is formatted by the browser.

The basic structure is:

  <html>
  <head>
  <title>title of the web page</title>
  </head>
  <body>
        Content which is displayed on the web page.
  </body>
  </html>

  All Html documents are saved with the extension.html or .htm

  The entire document is surrounded by <html> and </html>. It tells the software that 
  is processing html file.

  Html program is nothing but collection of tags or elements.

COMMENTS:

Comments in html document are important. That describes what the program code is and how it works.
It is a good idea to add comments for your html file.
In comments you can give

§  The name of the application
§  Name of the author.
§  Version number.
§  Copy write information etc.

Comments in html page are ignored by web browser.
Comments are not displayed in the web browser.
Comments can be placed either in the head section or  in body section of your document.
Comments are placed in the html page using the following tags:

§  Single line comment  <!.....................>
§  Multi line comment   <!.......................--
                                  --……………-->
   If a comment is runs over the number of lines each line must be starts and ends with “—“.

Related

Web Technology 1166360212711709490

Post a Comment

emo-but-icon

item