HTML Tutorial - Tags part 1


     Tag is a signal to web browser for displaying contents. It has two types.

  • ·       Standalone tags
  • ·       Container tags

 HTML has wide range of tags with different purpose. Based on location of the usage , tags are divided into many categories. They are listed below…

  1. Tags used in Document head
  2. Tags used in Document body
  3. Tags used in Forms
  4. Tags used in table

 Here, a detailed explanation of each tags with some examples shown below...

1.Tags used in Document head

    As everybody knows,Document head is the beginning part of HTML file.

It includes base information, heading,title of the page, document meta,information, type of scripting language used in the file,cascading style sheet information and so on…

Each tag has served for unique purpose. It has different attributes too.

i)                    <BASE>

It is a standalone tag in which the user can establish a base URL in a document. It has an attribute called HREF.

<BASE HREF=” www.rajeeva84.com/home.html”>

ii)                   <HEAD>

This is a container tag denotes the start of the document head.

Syntax:

 <!DOCTYPE HTML>

 <HTML>

<HEAD>

                         Elements…..

                       </HEAD>

                       …………

                       </HTML>

iii)                 <LINK>

If you want to link a page from the your current page, this stand alone tag is used.

It has many attributes.

HREF- URL of the document to be linked

NAME- Defines the name of the URL

METHODS- List of functions supported by current document

REL- Defines the relationship between the current document and the document linked

REV- Defines the reverse relationship between these two documents

TITLE- provides the title of linked document

URN- Uniform Resource Number

 

The example which shows a GM Biography is shown below….

 

<HEAD>

<TITLE> Export corporation limited </TITLE>

<BASE HREF=”http://exportcorporation.com/overview.html”>

<LINK HREF=”Directors/gm.html” REL=”precedes”>

<LINK HREF=”Directors/gm.html” TITLE=”GM Biography”>

<LINK HREF=” mailto:your_email@yourcompany.com” REV=”made”>

</HEAD>

 

iv)                 <META>

This stand alone tag provides the document meta information. It specifies the content, HTTP equivalent and the piece of meta information.

Eg:

<META name=”Reply To” content=”your_email@yourcompany.com”>

 

v)                   <SCRIPT>

This container tag shows the information about the scripting languages used.

Eg:

<SCRIPT src=”javacript.js”>

..............

</SCRIPT>

These are the tags used in document head.  

No comments:

Post a Comment