Pr.Pg Next Pg

Structure of HTML program tutorials

  • HTML web page is a simple text document, which is written with few tags. Following is structure of normal HTML file

 

Syntax:

<HTML>

<HEAD>

<TITLE>…………</TITLE>

</HEAD>

<BODY>

…….. Actual content of Web page

……..

</BODY>

</HTML>

 

  • Normally HTML page is divided in to 2 groups <HEAD> and <BODY>

  • <HEAD>: This part of the document contains information regarding html document. One may specify other information like title, Meta tags, base, index elements and even some functions.

  • All the information must be typed between <HEAD> ……… </HEAD> tags.

  • Also keeps in mind that elements, written between <head> tags do not get displayed in browser.

  • <BODY>: The entire contains of the document should be placed within BODY tag. It contains all the text, images, special effect, hyperlinks and such elements. All the information must be typed with in <BODY> ……………. </BODY>


 

<HEAD>….. </HEAD> Tag

  • This is a paired tag element. It requires opening and closing tag.

  • This part of the document contains information regarding html document. One may specify other information like title, Meta tags, base, index elements and even some functions.

  • All the information must be typed between <HEAD> ……… </HEAD> tags.

  • Also keeps in mind that elements, written between <head> tags do not get displayed in browser. It can contain following elements.

BASE

TITLE

ISINDEX

META

  • Tag like ISINDEX and META will be covered in advance HTML basically they are used for SEO purpose.

 

<BASE HREF = URL TARGET = Frame name>

  • This is a singular tag element. It doesn’t require closing tag.

  • This element must be placed within <HEAD> elements. This element specifies the base address and frame for relative HTML documents. It has following 2 attributes i.e.

  • HREF = URL: This attribute identifies the relative or absolute location of the base document in your sites.

 

Syntax:

<head>

<base href = “some_url” >

</head>

  • TARGET = Frame name: This attribute identifies the name of frame where a document should get loaded.

 

Syntax:

<head>

<base href = some_url target = frame_name>

</head>

Example
Output:
Example
Output:
Example
Output:

 

<TITLE > ………… </TITLE>

  • This is a paired tag element. It requires opening and closing tag. This element can be given only once, and is placed inside the <HEAD> element.

  • String information given between <TITLE> tags does not get displayed in document. Most of the browsers display information in the top left corner of windows title bar.

  • When anyone minimizes browser windows, it displays information in bottom windows taskbar button.

  • When anyone adds current site in Add to Favorites in IE, or add to Bookmark in NE, browser uses the Title as their list of bookmark.

 

Syntax:

<head>

<title> some title</title>

</head>

 

Example
Output:
Example
Output:
Pr.Pg border                                              Next Pg