HTML | Introductory TAGs Part 2




This includes <S> <SUP> <SUB> <TT> <BIG> <SMALL> <P> <IMG> All <LIST> tags and a big example.

<S>…</S> this tag is used to put strikethrough. That is, if we put any thing, suppose, TANMAY in between these tags, in output we will find it as,           TANMAY.
            <SUP>……</SUP> this tag is used to have superscript letters.
            <SUB>…….</SUB> this tag is used to have subscript letters. Use of this and the above tag is given bellow.
Input
Output
………………………….
………………………….
I was born on 29<SUP>th</SUP> Aug,1987.
H<SUB>2</SUB>SO<SUB>4</SUB> is a hard acid.
…………….
…………….
…………………………
………………………….
I was born on 29th Aug,1987.
HSO is a hard acid
………………….
…………………..
          <TT>…..</TT> this tag is for teletype format.
            <BIG>….</BIG> this is for big letters.
            <SMALL>……..</SMALL> this is for small letters.
            <P>…..</P> This is a

paragraph tag. When we put it, a new paragraph from a new line gets started. We can give its attributes like, ALIGN, values of which are LEFT, CENTER, RIGHT.
            <IMG> this is tag is to input image. We will have to give the attribute SRC and its value will be the full directory of the image. Such as, I have an image in this directory H:\Photos\Family photos\TANMAY and the name of the image file is TANMAY (20021).gif, then to input this file we will write the following code,
<IMG SRC="H:\Photos\Family photos\TANMAY\TANMAY (20021).gif">
          Remember, we can put some tags in between another tags. Consider the following part of the above given sample code,
            <P ALIGN="CENTER">
<IMG SRC="H:\Photos\Family photos\TANMAY\TANMAY (20021).gif">
</P>
            Here, we have put the <IMG> tag in between the <P>……</P> tag and thus the image will be placed at the center as the <P> tag is aligned at center. (See the illustrated sample given in the previous page).

            List : There are three kinds of lists; ordered, unordered and glossary list. They are described below.

            Ordered list : In ordered list, the items of the list is numbered. The number format can vary, such as, 1,2,3,…….. or I,II,III,…….. etc.
                        To start a ordered list we put <OL>
                   Each list item start with          <LI>
                   The list ends with                   </OL>
            In the tag <OL> we can put attribute to enter the type of number it will start with. This is as follows,
                        <OL TYPE=”1”> If we enter this, the list will begin with, 1. The available types are A,a,1,I,i. We can also start with any number such as 12,15,20,….etc. To do so, we will enter codes as follows,
                        <OL START=”15”> this will start the list with, 15. But when we will use roman number then we will enter code as,
                   <OL TYPE=”I” VALUE=”7”> this will start the list with, VII.

          Unordered list : In unordered list, the items of the list are bulleted instead of number.
                        To start a unordered tag enter <UL>
                   Each item start with                 <LI>
                   The list ends with                     </UL>
            In the tag <UL> we can put attribute to enter the type of bullet it will start with. This is as follows,
                        <OL TYPE=”DISC”> If we enter this, the list will begin with, DISC shape (). The available types are DISC, CIRCLE, SQUARE.

            Glossary list : Glossary lists are a bit different from the other two types of lists. It is a two level list, where for each item user can enter a definition term and the definition details. This is sometime as a dictionary.
                   To start a definition list enter   <DL>
                   To enter a definition term        <DT>
                   To enter the definition details <DD>
                   To finish the list                        </DL>
            Consider the following codes and the output.
           
Input
Output
……………….
……………….
<DL>
<DT>Raju
<DD>Age 21, medium height, student.
<DT>Rahul
<DD>Age 21, tall height, student.
</DL>
………………….
………………..
………………..
Raju
Age 21, medium height, student.
Rahul
Age 21, tall height, student.
………………..
………………..

           

Sample code – 2nd part:
<HTML>
<HEAD>
<TITLE>TANMAY CHAKRAVARTY</TITLE>
<BODY>
<H1 ALIGN="CENTER">KNOW THE TAGS</H1>
<PRE><FONT FACE="SYLFAEN" SIZE="4">
Putting strikethrough tag.
<S>I am TANMAY.</S>
Putting superscript and subscript tags.
A hard acid is H<SUB>2</SUB>SO<SUB>4</SUB>
I was born on 29<SUP>th</SUP> Aug,1987.
Putting teletype tag.
<TT>This happens when we use teletype tag.</TT>
Putting small tag.
<SMALL>This happens when we use small tag.</SMALL>
Putting big tag.
<BIG>This happens when we use big tag.</BIG>
Now we will create numbered or ordered list.
This is a ordered list.
<OL TYPE="A">
<LI>Asia
<LI>Africa
<LI>Antarctica
<LI>America
</OL>
</PRE>
Now we will create a complex ordered list.<BR>
This is a complex ordered list.
<OL TYPE="A">
<LI>Asia
<OL TYPE="1">
<LI>BANGLADESH
<OL TYPE="i">
<LI>Rajshahi
<LI>Dhaka
</OL>
<LI>INDIA
<LI>PAKISTAN
</OL>
<LI>Africa
<LI>Antarctica
<LI>America
<OL TYPE="1">
<LI>America
<LI>Canada
</OL>
</OL>
Now will create an unordered list.
<UL TYPE="DISC">
<LI>Asia
<LI>Africa
<LI>Antarctica
<LI>America
</UL>
We can create an complex unordered list just as the same way we have created a complex ordered list.
Now we will create an ordered and unordered mix list.
<OL TYPE="1">
<LI>Rajshahi
<UL TYPE="DISC">
<LI>Shaheb Bazar
<LI>Uposohor
<LI>Lokhipur
</UL>
<LI>Dhaka
<UL TYPE="CIRCLE">
<LI>Dhanmondi
<LI>Uttara
</UL>
</OL>
Now we will create a glossary list or definition list.
<DL>
<DT>Bangladesh
<DD>A south-Asian country.
<DT>Banana
<DD>It is a fruit.
</DL>
</BODY>
</HTML>


Output:




KNOW THE TAGS

 
Putting strikethrough tag.
I am TANMAY.
Putting superscript and subscript tags.
A hard acid is H2SO4
I was born on 29th Aug,1987.
Putting teletype tag.
This happens when we use teletype tag.
Putting small tag.
This happens when we use small tag.
Putting big tag.
This happens when we use big tag.
Now we will create numbered or ordered list.
This is a ordered list.

A. Asia
B. Africa
C. Antarctica
D. America

Now we will create a complex ordered list.
This is a complex ordered list.
A.   Asia
1.     BANGLADESH
                                                        i.            Rajshahi
                                                      ii.            Dhaka
2.     INDIA
3.     PAKISTAN
B.    Africa
C.    Antarctica
D.   America
1.     America
2.     Canada
Now will create an unordered list.
  • Asia
  • Africa
  • Antarctica
  • America
We can create a complex unordered list just as the same way we have created a complex ordered list. Now we will create an ordered and unordered mix list.
1.     Rajshahi
o    Shaheb Bazar
o    Uposohor
o    Lokhipur
2.     Dhaka
o    Dhanmondi
o    Uttara
Now we will create a glossary list or definition list.
Bangladesh
A south-Asian country.
Banana
          It is a fruit.


Recommended Recommends

Comments

Contact Us