Wednesday, May 18, 2016

on Leave a Comment

HTML tags

Some basic tag any web programmer:

1.Hn(header)
The header of HTML documents is controlles by<Hn> and </Hn> tags.The value of b range from 1 to 6.The H1 is largest size of header and H6 is smallest of all.

Syntax:
<Hn>header</Hn>
    Where n=1,2,3,4,5 and 6
Example
<H1>web</H1>
<HTML>
<BODY>
<H1>Web</H1>
</HTML>
                   
 Header alignment us also called used. Header us aligned to left by Default, but it a can be aligned center ,right or justify.

Syntax:
<Hn> align=”left/center/right/justify”>….</Hn>

2.P(Paragraph)

It si used to move sursor in new line leaving blank space.It is used in beginning of text.In this way,it is used to separate different paragraph.

Example:
<P>------</P>
<p align=”left/center/right/justify”>-------</p>


3.BR(break)
This tag moves the cursor in new line without leaving blank spaces.

Example:
Store<br>
Web<br>


4.HR(horizontal ruler)
It is used to draw horizontal line to separate section. Its attributes are:
Color: color name

No shade:unshaded dark gray line without the hollow and slightly three dimensional appearance.
Size: number
Width: number or %
Align: Left/right/center

Example:
<HR size=”8 color=”blue”>:It draws 8 pixels thick blue line
5.CENTER
This tag is used to place text in central position. The text written within <center> and </center> is aligned to the central part of document.

Syntax:
<CENTER>----</CENTER>

Example:
<center><H1>WECOME<H1><CENTER>

6.Text
The  text color for whole page can be defines within <body> tag.

Example:
<BODY TEXT=”blue”>

7.LINK,VLINK and ALINK
The color of anchor text is also defines within <BODY> tags. The default color of LINK  is blue, default color of VLINK is purple and ALINK color is red for Netscape Navigator and Microsoft internet Explore.

Example:
<BODY TEXT=”green” LINK=”yellow” VLINK=”red” ALINK=”green”>
8.TOPMARGIN and LEFTMARGIN
These are attributes of BODY tags used to set top and left margins of document. Some browser ignore these attributes.
Example:
<BODY TOPMARGINE=”25” LEFTMARGINE=”30”>

9.BGCOLOR and BACKGEOUND
These are also BODY attributes used to display background color and background images.

Example:
<BODY BGCOLOR=”build”>
<BODY BACKGROUND=”rain.gif”>

Sometime we use BGPROPERTIES attributes with BACKGROUND to prevent scrolling of images with text. This is a browser-sensitive attributes.
<BODY BACKGROUND=”weak.gif” BGPROPERTIES=”FIXED”>


0 comments:

Post a Comment