Saturday, 24 August 2013

                        In today’s session we are going to see some of the commonly used HMTL tags

HTML TAG REFERENCE
HTML(Outermost Tag)
                   Syntax:
                             <HTML>…</HTML>
                   *Used to identify document as a HTML document.
                    *All HTML document should start with the <HTML> tag and end with the</HTML> tag.

HEAD(DOCUMENT HEADER)
                   Syntax:
                             <HEAD>…</HEAD>
                   *The HEAD tag defines a HTML document header.
                   *You should put all header information between the <HEAD> and </HEAD> tags, which should precede the BODY tag.

BODY(MAIN CONTENT OF A DOCUMENT)
                   Syntax:
                             <BODY
BACKGROUND=”bgURL”
BGCOLOR=”color”
TEXT=”color”
LINK=”color”
ALINK=”color”
VLINK=”color”>
….
</BODY>

BACKGROUND=”bgURL”
                   Specifies an image to display in the background of the document.
BGCOLOR=”color”
                   Sets the color of the background.
TEXT=”color”
                   Set the color of the normal text in the document.
LINK=”color”
                   Sets the default text color of unvisited links in the document.
ALINK=”color”           
                   Specifies the color to which links briefly change when clicked.
VLINK=”color”
                   Specifies the text color of visited links in the document.
FOR EXAMPLE:
          <BODY BGCOLOR=”#FFFAA” TEXT=”black” VLINK=”green” ALINK=”red”>
….
</BODY>

BASE(Base URL)        
 Syntax:
                             <BASE HREF=”baseURL”>

                    =>The HREF attribute is required.
                             HREF=”baseURL”
                   *Specifies the location of the document. This value should be a full path name.
                   *Used within HEAD

FOR EXAMPLE:
          <HEAD><BASE HREF=”http://netscape.com/”></HEAD><BODY><P> Hi this link. Click on it<A HREF=”new.html”>NEW</A>

TITLE(DOCUMENT TITLE)       
                   Syntax:
                             <TITLE>…</TITLE>
                   *Used within HEAD
                   *This title appears in the title bar of  the browser window.


STANDARD HEADINGS
                   Syntax:
                             <H1 ALIGN=”LEFT”|”CENTER”|”RIGHT”>…</H1>
                             <H2 ALIGN=”LEFT”|”CENTER”|”RIGHT”>…</H2>
                             <H3 ALIGN=”LEFT”|”CENTER”|”RIGHT”>…</H3>
                             <H4 ALIGN=”LEFT”|”CENTER”|”RIGHT”>…</H4>
                             <H5 ALIGN=”LEFT”|”CENTER”|”RIGHT”>…</H5>
                             <H6 ALIGN=”LEFT”|”CENTER”|”RIGHT”>…</H6>

*H1 to H6
                   *Headings are usually  displayed in bolder, lager font than normal body text.                                                                                
                   ALIGN: Specifies the horizontal alignment of the heading.
                             =>LEFT
                             =>RIGHT
                             =>CENTER
P (PARAGRAPH)
                   Syntax:
                             <P
                             ALIGN==”LEFT”|”CENTER”|”RIGHT”
> 
….
</P>
                   ALIGN: Specifies the horizontal alignment of the paragraph.

PRE (PREFORMATTED TEXT,FIXED-WIDTH FONT)
                   Syntax:
                             <PRE
COLS=”columns”
WRAP
>…
</PRE>
                   COLS=”columns”
                                       Specifies the maximum no: of characters that fit on a line.
                   WRAP
                                      Turns on wrapping, so that all lines fit inside the browser.


LISTS
                   This selection describes the tags for displaying lists.
          DL(DEFINITION LIST)
                   Syntax:
                             <DL COMPACT
>…
</DL>
          DT(DEFINITION TERM)
                   Syntax:
                             <DT
                             >
Used within <DL>

          DD(DEFINITION DESCRIPTION)
                             Syntax:
                             <DD
> 
Used within <DL>
          NOTE: DT tag and DD tag does not require a closing tag.
          FOR EXAMPLE:
                   <DL COMPACT>
                   <DT>HTML
                             <DD>This  tag marks a text file as aHTML document.
                   </DL>

OL(ORDERED LIST):
                   Syntax:
                             <OL
START=”value”  
TYPE=”A”|”a”|”I”|”i”1
> 
….
</OL>
          START: Indicates the starting number for the list. Number must be +ve integer..
          TYPE: defines the type of numbering sequence used for each list item.
                   *A specifies a sequence of uppercase letters.
                   *a specifies a sequence of lowercase letters.
                   *I specifies a sequence of uppercase Roman numerals.
                   *i specifies a sequence of lowercase Roman numerals.
                   *1 specifies a sequence of numbers.

UL(UNORDERED LIST)
                   Syntax
                             <UL TYPE=”CIRCLE”|”DISC”|”SQUARE”>
          TYPE: defines the type of bullet used for each item.

LI(LIST ITEM)
                   Syntax
                             <LI
TYPE= CIRCLE”|”DISC”|”SQUARE”| ”A”|”a”|”I”|”i”1
VALUE=”number”
>

HORIZONTAL RULES:
                   Syntax:
                             <HR SIZE=”value”>…...</HR>
                   *Used to produce a horizontal line.

FOR EXAMPLE:
          <HTML>
          <HEAD>
<H1 ALIGN=”CENTER”>SAMPLE</H1>
<TITLE>MY SAMPLE PROGRAM</TITLE>
</HEAD>
<HR SIZE=”20”/>
<BODY  BGCOLOR=”#FFFAA”  TEXT=”black” LINK=”blue” VLINK=”green”  ALINK=”red”>
<PRE>
<OL START=1" TYPE="I">
<LI><A HREF=”www.google.com”>GOOGLE</A><BR>
<LI><A HREF=”www.yahoo.com”>YAHOO</A><BR>
<LI><A HREF=”www.microsoft.com”>MICROSOFT</A><BR>
</OL>

<UL TYPE="CIRCLE">
<LI><A HREF=”www.google.com”>GOOGLE</A><BR>
<LI><A HREF=”www.yahoo.com”>YAHOO</A><BR>
<LI><A HREF=”www.microsoft.com”>MICROSOFT</A><BR>
</UL>
</PRE>
</BODY>
</HTML>


TEXT CHARACTERISTICS

          B(BOLD FACE): used to display text in boldface type
                   Syntax:
                             <B>…</B>
          BLINK(BLINKING TEXT): used  to make text blink on and off
                   Syntax:
                             <BLINK>…</BLINK>

EM(EMPHASIZED TEXT): used to display text in an emphasized style.
          Syntax:     
                   <EM>…</EM>


FONT(FONT COLOR,FACE AND SIZE)
                   *Used to change the color,size and typeface of the font
                   *All text between the <FONT> and </FONT> tags is displayed with specified font characteristics.
                   Syntax:
                             <FONT COLOR=”color”  FACE=”fontlist”  POINT-SIZE=”pointsize”
SIZE=”number”  WEIGHT=”boldness”>…</FONT>
         

I (ITALICS): used to display text in Italic
                   Syntax:
                                      <I>…</I>
         
STRIKE(STRIKEOUT TYPE): display text with a line through it.
Syntax:
                                      <STRIKE>…</STRIKE>
         
U (UNDERLINE): underlines the text it encloses
                   Syntax:
                                      <U>…</U>         

SUB (SUBSCRIPT): display text as a subscript ie appears slightly below the baseline         and in smaller font.
                   Syntax:
                                      <SUB>…</SUB>                  

SUP (SUPERSCRIPT): display text as a superscript ie appears slightly above the top of the preceding text and in smaller font.
                   Syntax:
                                      <SUP>…</SUP>
         
BR(LINE BREAK ): inserts a line break.
                   Syntax:
                                      <BR>
         
CENTER(CENTERED CONTENT): centers the content enclosed with it
                   Syntax:
                                      <CENTER>…<CENTER>

          IMG(IMAGE)
                   *Used to specifies an image to be displayed in the HTML document.       
                   Syntax:
                             <IMG SRC=”location”  ALT=”alternative Text”  ALING=”alignment”
BORDER=”border width”  HEIGHT=”height”  WIDTH=”width”
          HSPACE=”horizMargin”  VSPACE=”verticalMargin”>
         
FOR EXAMPLE:
                   <HTML>
<HEAD><H3 ALIGN="RIGHT">FONT DESIGN</H3>
<TITLE>FONT</TITLE>
<HR SIZE="30" />
</HEAD>
<BODY><CENTER><B><I><U>
HI WELCOME TO JUST ENJOY BLOG
</B></I></U></CENTER>
<BLINK>Learn</BLINK> here to create our <EM>basic</EM>
own web form.
<P><FONT COLOR="GREEN" FACE="TIMES NEW ROMAN"
SIZE="5">THERE ARE DIFFERENT FONT SYTLE AND SIZE
ARE AVAIL; THIS SESSION MAKES U CLEAR ABOUT
IT.</FONT><BR>
<FONT COLOR="RED" FACE="TIMES NEW ROMAN" SIZE="4">  <U>UNDERLINE</U><BR>
<I>ITALICS</I><BR>
<STRIKE>STRIKEOUT</STRIKE>
</FONT><BR><CENTER>
<IMG SRC="D:\New Folder\zara_tiny_angel.jpg"
ALIGN="MIDDEL" HEIGHT=300 WIDTH=300/><EM><B><BR>
ALL THE BEST!</B><EM></CENTER>
</HTML>


No comments:

Post a Comment