Untitled Document



 Introduction to HTML
 Structure of HTML
 Creating First HTML  Document
 Understanding Basic  HTML Tools
 Creating First HTML  Document
 Understanding Basic  HTML Tools
   HTML Editors
 Web Browsers
 Starting an HTML  Document
 
 Starting an HTML  Document
 The <!DOCTYPE>  Declaration
 Setting the  boundaries With  <HTML> Tag
   The HEAD Element
   <TITLE> Tag
 A <BASE> for  Hyperlinks
 Showing  Relationships with  <LINK>
 Using <META>to give  More information
 The BODY Element
 
   The Body Element
   <BODY> Tag
 Breaking a Body into  Pieces
   Headings <Hn>
 A New Paragraph <P>
 A New Line <BR>
 Using Horizontal Rulers
 
 Using Horizontal  Rulers
 The STYLE Element
 
 The STYLE Element
 The SCRIPT Element
 
 The SCRIPT Element
 Head and Body tags
 Building Your HTML  Document
 Tables
 Frames
 Including Images into  Document
 Including Multimedia
 Developing HTML  FORMS
 Using Style Sheet
 Understanding URLs
 Using JavaScript
 Using Java

Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.




  Creating First HTML Document > The Body Element

  The Body Element

Breaking a Body into pieces: <DIV> and <SPAN>
Heading <H1> Through<H6>
A New Paragraph <P>
A New Line <BR>

  <BODY> Tag

Like the <HEAD> tag, the <BODY> tag's primary purpose is to demarcate the main portion of the document-the part seen by the user. In this tag, the document contents are any valid HTML content, including text, forms, graphics, special content, and so on. Body includes six attributes to describe default values: BGCOLOR(background color), BACKGROUND(background image), TEXT(text color), LINK(normal link color), ALINK(link color during a click), and VLINK(visited link color).

Syntax:

<BODY[onload=action] [onunload=action] [core] [events]>
…document contents…
</BODY>

The onload event specifies a script or other action to take when the entire contents of the document have been loaded but not yet rendered by the browser. The onunload event happens when the user made an action to leave the current page.

  Breaking a Body into Pieces

The <div> element is used to structure an HTML document into a series of divisions. The <DIV> tag is a block element that acts much like a <P> tag, except it marks a section instead of an individual paragraph. Only a block text element is allowed after <DIV> such as <P> tag.

Syntax:

<DIV [align] [core] [international] [events] >
…contents…
</DIV>

The <SPAN> tag is similar to the <DIV> tag, except that it is used to mark content inline rather than create a new block.

Syntax:

<SPAN [align] [core][international] [events]>
…contents…
</SPAN>

  Headings <Hn>

The six HTML heading styles (H1 to H6) are a way of showing the level of importance among different parts of your page to visually organize it. The lowest level of heading is smaller than the body text in some browsers. You can set the style (emphasis, strong emphasis, bold, italics) or usage (address, hyperlink) within a heading to give it additional emphasis. They always start a new paragraph, even if they are placed Inline with other content.

Syntax:

<Hn [core] [international] [events]>
...Heading...
</Hn>

(here "n" is an integer from 1 to 6 - indicating the level of heading)

Example:

<P>it is always a great going with<H3>Layout Galaxy Tutorial</H3>

  A New Paragraph <P>

The browser ignores the extra line breaks given in the text of the HTML document. The only way to give line breaks or paragraph breaks is to give them specifically in the HTML document. The closing tag </tag> is an optional one.

Syntax:

<P [core][events]>
… text contents…
</P>

Example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http: //www.w3.org/TR/REC - html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>
Layout Galaxy Home page
</TITLE>
</HEAD>
<P>Welcome to Layout Galaxy Home page.</P>
<P>This is page starts with the first lesson of your HTML Training Program <P>and the other lessons of the training program <P>which offers you an exhaustive and easy go.
</HTML>

  A New Line <BR>

The line break tag, <BR> starts a new line within the same paragraph.

Syntax:

<BR [clear=left|all|right|none|[core]>…text contents…

(Text is the material that has to appear on the next line, and optional clear attribute defines how the following material should flow around floating images.)

Example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http: //www.w3.org/TR/REC - html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>
Layout Galaxy Home page
</TITLE>
</HEAD>
Welcome to Layout Galaxy Home page.
<BR>This is page starts with the first lesson of your HTML Training Program <BR>and the other lessons of the training program <BR>which offers you an exhaustive and easy go.
</HTML>

Back Next


Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.




17, Vadsarvala Nivas, 65-A, J. Nehru Road, Mulund (W), Mumbai - 400 080 INDIA
Tel : 91-22-25795588, 91-22-25780444 Fax : 91-22-25793397
Email : ionline@vsnl.com
© Image Online 2001-2003