ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing
ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
FAQ
Login
 
HTML Tutorial - Index
HTML Tutorial - Introduction
HTML Tutorial - Formatting
HTML Tutorial - Links
HTML Tutorial - Images
HTML Tutorial - Forms
HTML Tutorial - Tables
HTML Tutorial - Frames
HTML Tutorial - Style Sheets
HTML Tutorial - Advance Tags
     

 
Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Six Sigma Certification
Find a Personal Trainer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Master Black Belt Certification
Six Sigma Green Belt Certification
Life Coach Certification
Lean Management Certification
Lean Six Sigma Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Business Writing Course & Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Medical Coding Certification
Medical Billing Certification
Business Analysis Course
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
Event Management Certification
Test Search by Job Title
Administrative Assistant Certification
Virtual Assistant Certification
  All Online Courses
   

   
   
   
   
   
   
   
  Home > Courses, Tutorials & eBooks > HTML Tutorial > About HTML
 
Previous Next
 
HTML Tutorial - About HTML
   
                                                                                                Page 2 of 3
  HTML Tags
 

 

A detailed study of tags is necessary to further modify the HTML document.

As discussed above, tags are the elements that make up the HTML document. The following
points elaborate their use and grammar:

  • Tags are used to denote the various elements in an HTML document.
  • A tag consists of a left angle bracket (<), a tag name, and a right angle bracket (>).
  • All tags are paired, meaning that a tag started has to end.
  • The start tag looks like <BODY>. The end tag is preceded by a slash (/), e.g. </BODY>.
  • Some tag elements may include an attribute, which is additional information included
    inside the tag.
  • These attributes can be anything like the alignment of images, font size of the text, etc.
  • HTML is not case sensitive. This means that the tag <TITLE> is equivalent to <title>.
  Classification of Tags
 
 
The Basic Classification of Tags are:

HTML

The first and last tags in an HTML document should always be the HTML tags. These tags tell the web browser that the file contains HTML coded information. All other tags come between the <HTML> tags. The HTML tags look like this:

Syntax:

          <HTML>
 
          </HTML>
 

HEAD

The <HEAD> tag is the first part of HTML coded document. It contains the title of the document. The title is displayed as a part of the web browser. The HEAD tag looks like this:

Example:

          <HEAD>
                     <TITLE> This is my page </TITLE>
          </HEAD>
 

TITLE

The <TITLE> tag is contained within the <HEAD> tags. It contains the title of the document. Each document can have only one title. The title of the document should be relevant to the content of the document. The title is displayed in the title bar at the top of the browser window.


The TITLE tag looks like this:

Example:

                     <TITLE> This is my page </TITLE>
 

BODY

The <BODY> tag contains the contents of a document. Everything visible on the web page goes into the <BODY> tag. All the text, headers, tables, headings, paragraph, etc go into this tag. The BODY tag looks like this:

Syntax:

           <BODY>
           </BODY>
 

 

  Some Attributes of the Body Tag
 

 

BGCOLOR

This attribute sets the background color of the web page. For example, to set the background color of the web page to blue, one has to type <BODY BGCOLOR = “BLUE”>

BACKGROUND

This attribute sets the picture to be used as a background for the page. If the picture is stored in the same directory as that of HTML document, then only the name of the picture has to be typed. In the other case, the full path of the picture has to be typed. For e.g.

Case 1 - For a picture in the same directory:

<BODY BACKGROUND = “nature. jpg”>

Case 2 - For a picture in another directory:

<BODY BACKGROUND = “c:\abc\nature.jpg”>

TEXT

This attribute sets the color of the text on the page. To set the color of the text to blue, the syntax
is:

Syntax:

           <BODY TEXT = “BLUE”>
 

TOPMARGIN

This attribute sets the size of the top and bottom margins. It accepts an integer value. To set the
top and bottom margins to 1, the syntax is:

Syntax:

<BODY TOPMARGIN = 1>
 

LEFTMARGIN

This attribute sets the size of the left and right margins. It accepts an integer value. To set the left and right margin to 1, the syntax is:

Syntax:

              <BODY LEFTMARGIN = 1>
 

COMMENTS

There can be notes left for viewing in an HTML document. These notes are not visible in the web browser. To do this the Comment tag is used. The comment tag is a single tag, which means that
this tag does not end. The comment is started with an exclamation mark. Exclamation mark is put after the opening bracket but not before the closing bracket. For e.g.

<!----Hello, This is a Comment---->


Example with a Background Color--

<html>

<head>

<title> My bag of jokes </title>

</head>

<body bgcolor = “#CCFFCC” text = “blue” topmargin = 1 leftmargin = 1 >

<!----I am starting off with my web site---->

 

Hello, this is My Jokes website. Here you can read some rib-tickling jokes. These jokes are meant for people of all ages. Some of them are good, and will have you in splits.

</body>

</html>


This is how this web page looks:

             

 

     
Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
 
© ExpertRating 2006. All Rights Reserved.