0% found this document useful (0 votes)
179 views

Index: Sr. No - Experiment Dates Signatures

The document is an index of HTML tags and their usage from an e-commerce practical file. It contains a list of common HTML tags like <a>, <b>, <body>, <form>, <h1>, <img>, <input> along with code examples and brief explanations of how each tag is displayed in the browser. The index is intended to teach students the basic HTML tags and their functions through examples.

Uploaded by

Anjleen Virdi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views

Index: Sr. No - Experiment Dates Signatures

The document is an index of HTML tags and their usage from an e-commerce practical file. It contains a list of common HTML tags like <a>, <b>, <body>, <form>, <h1>, <img>, <input> along with code examples and brief explanations of how each tag is displayed in the browser. The index is intended to teach students the basic HTML tags and their functions through examples.

Uploaded by

Anjleen Virdi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

e-commerce practical file 2010

INDEX
Sr.

No Experiment Dates Signatures


.

1. Write all HTML Tags.

2. HTML form to enter Username &


Password.

3. HTML form to display student’s


profile.

4. HTML form to display an image on


page.

5. To show linking with Text.

6. To show linking with Image.

7. Event handling with mouse click.

8. Program to calculate the result


using event handling.

Submitted by: Anjleen virdi Page 1


e-commerce practical file 2010

9. Website Manual

AIM1: Write all HTML TAGS.

HTML Tags Chart

Tag Name Code Example Browser View


<!--This can be viewed in the HTML part of a
<!-- comment Nothing will show (Tip)
document-->
<a href="http://www.domain.com/">
<a - anchor Visit Our Site (Tip)
Visit Our Site</a>
<b> bold <b>Example</b> Example
<big> big (text) <big>Example</big> Example (Tip)
body of
Contents of your web
<body> HTML <body>The content of your HTML page</body>
page (Tip)
document
The contents of your page<br>The contents of The contents of your web page
<br> line break
your page The contents of your web page
<center> center <center>This will center your contents</center> This will center your contents
<dl> Definition Term
<dt>Definition Term</dt> Definition of the
definition <dd>Definition of the term</dd> term
<dd>
description <dt>Definition Term</dt> Definition Term
<dd>Definition of the term</dd> Definition of the
</dl> term
<dl>
<dt>Definition Term</dt> Definition Term
definition <dd>Definition of the term</dd> Definition of the term
<dl>
list <dt>Definition Term</dt> Definition Term
<dd>Definition of the term</dd> Definition of the term
</dl>
<dl>
<dt>Definition Term</dt> Definition Term
definition <dd>Definition of the term</dd> Definition of the term
<dt>
term <dt>Definition Term</dt> Definition Term
<dd>Definition of the term</dd> Definition of the term
</dl>
This is an <em>Example</em> of using This is an Example of using
<em> emphasis
the emphasis tag the emphasis tag
embed <embed src="yourfile.mid" width="100%"
<embed>
object height="60" align="center"> (Tip)
<embed> embed <embed src="yourfile.mid" autostart="true"
object hidden="false" loop="false">  
<noembed><bgsound src="yourfile.mid" Music will begin playing when
loop="1"></noembed> your page is loaded and will
only play one time. A control

Submitted by: Anjleen virdi Page 2


e-commerce practical file 2010

panel will be displayed to


enable your visitors to stop the
music.
<font face="Times New
<font> font Example (Tip)
Roman">Example</font>
<font face="Times New Roman"
<font> font
size="4">Example</font> Example (Tip)

<font> font
<font face="Times New Roman" size="+3"
color="#ff0000">Example</font> Example  (Tip)

<form action="mailto:[email protected]">
Name: <input name="Name" value=""
Name:   (Tip) 
size="10"><br> 
<form> form Email: <input name="Email" value="" Email: 
size="10"><br>
<center><input type="submit"></center> Submit
</form>

<h1> heading 1 <h1>Heading 1 Example</h1>


<h2> heading 2 <h2>Heading 2 Example</h2>
<h3> heading 3 <h3>Heading 3 Example</h3>
<h4> heading 4 <h4>Heading 4 Example</h4>
<h5> heading 5 <h5>Heading 5 Example</h5>
<h6> heading 6 <h6>Heading 6 Example</h6>

heading of
<head>Contains elements describing the
<head> HTML Nothing will show
document</head>
document

Contents of your web


horizontal page (Tip)
<hr> <hr />
rule
Contents of your web page
Contents of your web page
horizontal
<hr> <hr width="50%" size="3" />
rule
Contents of your web page
Contents of your web page
horizontal
<hr> <hr width="50%" size="3" noshade />
rule
Contents of your web page
<hr> Contents of your web page
horizontal
(Internet  <hr width="75%" color="#ff0000" size="4" />
rule
Explorer) Contents of your web page
<hr> Contents of your web page
horizontal
(Internet  <hr width="25%" color="#6699ff" size="6" />
rule
Explorer) Contents of your web page
<html> hypertext <html> Contents of your web page
markup <head>
language <meta>
<title>Title of your web page</title>
</head>

Submitted by: Anjleen virdi Page 3


e-commerce practical file 2010

<body>HTML web page contents


</body>
</html>
<i> italic <i>Example</i> Example

<img src="Earth.gif" width="41" height="41"


<img> image
border="0" alt="text describing the image" />
 (Tip)
Example 1:
Example 1: (Tip)
<form method=post action="/cgi-
<input> input field bin/example.cgi">
<input type="text" size="10" maxlength="30"> Submit
<input type="Submit" value="Submit">  
</form>
Example 2:

<form method=post action="/cgi-


bin/example.cgi"> Example 2: (Tip)
<input>
<input type="text" style="color: #ffffff; font-
(Internet input field
family: Verdana; font-weight: bold; font-size: Submit
Explorer)
12px; background-color: #72a4d2;" size="10"  
maxlength="30">
<input type="Submit" value="Submit">
</form>
Example 3:
Example 3: (Tip)
<form method=post action="/cgi-
bin/example.cgi">
<table border="0" cellspacing="0"
cellpadding="2"><tr><td
<input> input field
bgcolor="#8463ff"><input type="text" size="10"
maxlength="30"></td><td bgcolor="#8463ff"
valign="Middle"> <input type="image"
name="submit" src="yourimage.gif"></td></tr>
</table>
</form>
Example 4:
Example 4: (Tip)
<form method=post action="/cgi-
bin/example.cgi">
Enter Your Comments:<br>
<input> input field <textarea wrap="virtual" name="Comments"
rows=3 cols=20
maxlength=100></textarea><br>
<input type="Submit" value="Submit">
Submit Clear
<input type="Reset" value="Clear">  
</form>
<input> input field Example 5: Example 5: Tip)

<form method=post action="/cgi- Select an


bin/example.cgi"> option 2
<center>
Select an option: option:   
<select>
<option >option 1</option>

Submitted by: Anjleen virdi Page 4


e-commerce practical file 2010

<option selected>option 2</option>


<option>option 3</option>
<option>option 4</option>
<option>option 5</option> Submit
<option>option 6</option>
</select><br>
<input type="Submit" value="Submit"></center>
</form>
Example 6:
Example 6: (Tip)
<form method=post action="/cgi-
bin/example.cgi"> Select an option:
Select an option:<br>
<input type="radio" name="option"> Option 1  Option 1
<input type="radio" name="option" checked>
Option 2  Option 2
<input type="radio" name="option"> Option 3
 Option 3
<br>
<input> input field
<br>
Select an option:
Select an option:<br>
<input type="checkbox" name="selection">  Selection 1
Selection 1
<input type="checkbox" name="selection"  Selection 2
checked> Selection 2
<input type="checkbox"  Selection 3
name="selection"> Selection 3 Submit
<input type="Submit" value="Submit">
</form>
Example 1: (Tip)
Example 1:
 List item 1
<menu>
<li type="disc">List item 1</li>
<li type="circle">List item 2</li> o List item 2
<li type="square">List item 3</li>
</MENU>  List item 3
<li> list item
Example 2:
Example 2:
<ol type="i">
<li>List item 1</li>
<li>List item 2</li> i. List item 1
<li>List item 3</li> ii. List item 2
<li>List item 4</li> iii. List item 3
</ol> iv. List item 4

<head>
<link rel="stylesheet" type="text/css"
<link> link
href="style.css" />
</head>

<marquee> <marquee bgcolor="#cccccc" loop="-1"


scrolling
(Internet  scrollamount="2" width="100%">Example
text
Explorer) Marquee</marquee>

(Tip)

Submitted by: Anjleen virdi Page 5


e-commerce practical file 2010

 List item 1
<menu>
<li type="disc">List item 1</li> o List item 2
<menu> menu <li type="circle">List item 2</li>
<li type="square">List item 3</li>
</menu>  List item 3

<meta name="Description" content="Description
of your site">
<meta> meta Nothing will show (Tip)
<meta name="keywords" content="keywords
describing your site">
<meta HTTP-EQUIV="Refresh"
<meta> meta CONTENT="4;URL=http://www.yourdomain.com/" Nothing will show (Tip)
>
<meta> meta <meta http-equiv="Pragma" content="no-cache"> Nothing will show (Tip)
<meta> meta <meta name="rating" content="General"> Nothing will show (Tip)
<meta> meta <meta name="robots" content="all"> Nothing will show (Tip)
<meta> meta <meta name="robots" content="noindex,follow"> Nothing will show (Tip)
<ol> ordered Numbered Numbered
list
<ol> 1. List item 1
<li>List item 1</li> 2. List item 2
<li>List item 2</li> 3. List item 3
<li>List item 3</li> 4. List item 4
<li>List item 4</li>
</ol>
Numbered Special Start
Numbered Special Start
5. List item 1
<ol start="5"> 6. List item 2
<li>List item 1</li> 7. List item 3
<li>List item 2</li> 8. List item 4
<li>List item 3</li>
<li>List item 4</li> Lowercase Letters
</ol>
a. List item 1
Lowercase Letters b. List item 2
c. List item 3
<ol type="a"> d. List item 4
<li>List item 1</li>
<li>List item 2</li> Capital Letters
<li>List item 3</li>
<li>List item 4</li>
</ol> A. List item 1
B. List item 2
Capital Letters C. List item 3
D. List item 4
<ol type="A">
<li>List item 1</li> Capital Letters Special Start
<li>List item 2</li>
<li>List item 3</li> C. List item 1
<li>List item 4</li> D. List item 2
</ol> E. List item 3
F. List item 4

Submitted by: Anjleen virdi Page 6


e-commerce practical file 2010

Capital Letters Special Start Lowercase Roman


Numerals
<ol type="A" start="3">
<li>List item 1</li> i. List item 1
<li>List item 2</li> ii. List item 2
<li>List item 3</li> iii. List item 3
<li>List item 4</li> iv. List item 4
</ol>
Capital Roman Numerals
Lowercase Roman Numerals
I. List item 1
<ol type="i"> II. List item 2
<li>List item 1</li> III. List item 3
<li>List item 2</li> IV. List item 4
<li>List item 3</li>
<li>List item 4</li>
Capital Roman Numerals
</ol>
Special Start
Capital Roman Numerals
VII. List item 1
VIII. List item 2
<ol type="I">
IX. List item 3
<li>List item 1</li>
X. List item 4
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>

Capital Roman Numerals Special Start

<ol type="I" start="7">


<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<form method=post action="/cgi-
bin/example.cgi">
<center>
Select an option:
<select>
<option>option 1</option>
listbox <option selected>option 2</option> Select an option: (Tip)
<option> option 2
option <option>option 3</option>
<option>option 4</option>
<option>option 5</option>
<option>option 6</option>
</select><br>
</center>
</form>
<p> paragraph This is an example displaying the use of the This is an example displaying
paragraph tag. <p> This will create a line break the use of the paragraph tag.
and a space between lines.
This will create a line break
Attributes: and a space between lines.

Submitted by: Anjleen virdi Page 7


e-commerce practical file 2010

Example 1:<br>
<br> Attributes:
<p align="left">
This is an example<br> Example 1: 
displaying the use<br>
of the paragraph tag.<br> This is an example
<br> displaying the use
Example 2:<br> of the paragraph tag.
<br>
<p align="right"> Example 2:
This is an example<br>
displaying the use<br> This is an example
of the paragraph tag.<br> displaying the use
<br> of the paragraph tag.
Example 3:<br>
<br>
Example 3: 
<p align="center">
This is an example<br>
This is an example
displaying the use<br>
displaying the use
of the paragraph tag.
of the paragraph tag.
small
<small> <small>Example</small> Example (Tip)
(text)
deleted
<strike> <strike>Example</strike> Example
text
strong
<strong> <strong>Example</strong> Example
emphasis
Example 1:

<table border="4" cellpadding="2"


cellspacing="2" width="100%">
<tr>
<td>Column 1</td>
<td>Column 2</td>
</tr>
</table> Example 1: (Tip)
Example 2: (Internet Explorer) Column 1 Column 2

<table border="2" bordercolor="#336699" Example 2: (Tip)


cellpadding="2" cellspacing="2" width="100%">
<tr>
<table> table Column 1 Column 2
<td>Column 1</td>
<td>Column 2</td>
</tr> Example 3: (Tip)
</table>
Column 1 Column 2
Example 3:
Row 2 Row 2
<table cellpadding="2" cellspacing="2"
width="100%">
<tr>
<td bgcolor="#cccccc">Column 1</td>
<td bgcolor="#cccccc">Column 2</td>
</tr>
<tr>
<td>Row 2</td>

Submitted by: Anjleen virdi Page 8


e-commerce practical file 2010

<td>Row 2</td>
</tr>
</table>
<table border="2" cellpadding="2" cellspacing="2"
width="100%">
<tr>
<td> table data <td>Column 1</td>
Column 1 Column 2
<td>Column 2</td>
</tr>
</table>
<div align="center">
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
<td>Row 2</td>
<td>Row 2</td> Column Column Column
<td>Row 2</td>
table </tr>
1 2 3
<th> Row 2 Row 2 Row 2
header <tr>
<td>Row 3</td> Row 3 Row 3 Row 3
<td>Row 3</td> Row 4 Row 4 Row 4
<td>Row 3</td>
</tr>
<tr>
<td>Row 4</td>
<td>Row 4</td>
<td>Row 4</td>
</tr>
</table>
</div>
document Title of your web page will be
<title> <title>Title of your HTML page</title>
title viewable in the title bar.(Tip)
<table border="2" cellpadding="2" cellspacing="2"
width="100%">
<tr>
<tr> table row <td>Column 1</td> Column 1 Column 2
<td>Column 2</td>
</tr>
</table>
<tt> teletype <tt>Example</tt> Example
<u> underline <u>Example</u> Example
<ul> unordered Example 1:<br> Example 1:
list <br>
<ul>  List item 1
<li>List item 1</li>  List item 2
<li>List item 2</li>
</ul>
<br>
Example 2:
Example 2:<br>
<ul type="disc">
<li>List item 1</li>  List item 1

Submitted by: Anjleen virdi Page 9


e-commerce practical file 2010

<li>List item 2</li>


<ul type="circle">  List item 2
<li>List item 3</li> o List item 3
<li>List item 4</li> o List item 4
</ul>
</ul>

AIM 2: A simple HTML form to enter Username & Password.

<html>
<head>
</head>
<title>HTML</title>
<h2><marquee>WELCOME TO HTML LAB</marquee>
</h2>
<body bgcolor="green">
<table border ="3" align="center">
<tr>
<td> username</td>
<td><input type="text" name="a1"></td>
</tr>
<tr>
<td> password</td>
<td><input type="text" name="b1"></td>
</tr>
</table>
<table align="center">
<tr>
<td><input type="button" value="submit">
</td>
</tr>

Submitted by: Anjleen virdi Page 10


e-commerce practical file 2010

</table>
</body>
</html>

OUTPUT:

Submitted by: Anjleen virdi Page 11


e-commerce practical file 2010

AIM 3: HTML form to display Student’s Profile.


<html>
<head>
</head>
<title>HTML</title>
<body style="background-color:yellow">
<h2 style="background-color:red" "font-family:verdana">html tags</h2>
<p style= "font-family:arial;color:red;font-size:20px;" >this is html</p>
<table border="2">
<caption>Student Profile</caption>
<frameset cols=20%,40%,40%>
<frame src="frame_a.html"/>
<frame src="frame_b.html"/>
<frame src="frame_c.html"/>
</frameset>
<tr>
<td>Name</td>
<td><input type="text" name="a1"></td>
</tr>
<tr rowspan="2">
<td >class</td>
<td><input type="text" name="b1"></td>
<td>branch</td>

Submitted by: Anjleen virdi Page 12


e-commerce practical file 2010

<td><input type="text" name="c1"></td>


</tr>
<tr>
<td>Roll no</td>
<td><input type="text" name="e1"></td>
</tr>
<th rowspan="2">sex</th>
<td>male</td>
<td><input type="radio" name="sex" value="male"></td>
</tr>
<tr>
<td>female</td>
<td><input type="radio" name="sex" value="female"></td>
</tr>
<tr>
<th colspan="2" >hobbies</th>
<tr rowspan="2">
<td>playing</td>
<td><input type="checkbox" name="check" value="playing"></td>
<td>studying</td>
<td><input type="checkbox" name="check" value="studying"></td>
</tr>
</tr>
<tr>
<tr rowspan="2">
<td>watching tv</td>
<td><input type="checkbox" name="check" value="watching tv"></td>

Submitted by: Anjleen virdi Page 13


e-commerce practical file 2010

<td>book reading</td>
<td><input type="checkbox" name="check" value="book reading"></td>
</tr>
</tr>
</table>
</body>
</html>

OUTPUT:

Submitted by: Anjleen virdi Page 14


e-commerce practical file 2010

AIM 4: HTML form to display an image on Page with profile chart.


<html>
<head>
</head>
<title>INFORMATION FORM</title>
<H2> <MARQUEE> WELCOME TO INFORMATION DEPTT </MARQUEE></H2>
<body style="background-color:GREY">
<h2 style="background-color:PINK" "font-family:LUCIDA HANDWRITING">PROFILE</h2>
<p style= "font-family:BOOKMAN OLD STYLE;color:PINK;font-size:20px;" >B.TECH
STUDENT</p>
<img src="cc.jpg" width="200" height="150" />
<table border="2" align ="center">
<caption>Student Profile</caption>
<tr>
<td>Name</td>
<td><input type="text" name="a1"></td>
</tr>
<tr>
<td >class</td>
<td><input type="text" name="b1"></td>
</tr>
<tr>
<td>branch</td>
<td><input type="text" name="c1"></td>

Submitted by: Anjleen virdi Page 15


e-commerce practical file 2010

</tr>
<tr>
<td>Roll no</td>
<td><input type="text" name="e1"></td>
</tr>
<th rowspan="2">sex</th>
<td>male</td>
<td><input type="radio" name="sex" value="male"></td>
</tr>
<tr>
<td>female</td>
<td><input type="radio" name="sex" value="female"></td>
</tr>
<tr>
<th colspan="2" >COURSE</th>
<tr rowspan="2">
<td>I.T</td>
<td><input type="checkbox" name="check" value="I.T"></td>
<td>C.S.E</td>
<td><input type="checkbox" name="check" value="C.S.E"></td>
</tr>
</tr>
<tr>
<tr rowspan="2">
<td>E.C.E</td>
<td><input type="checkbox" name="check" value="C.S.E"></td>
<td>MECH.</td>

Submitted by: Anjleen virdi Page 16


e-commerce practical file 2010

<td><input type="checkbox" name="check" value="MECH."></td>


</tr>
</tr>
<tr>
<td><input type="button" value ="submit" >
</td>
</tr>
</table>
</body>
</html>

Submitted by: Anjleen virdi Page 17


e-commerce practical file 2010

OUTPUT:

Submitted by: Anjleen virdi Page 18


e-commerce practical file 2010

AIM 5a: To show linking with text.

<html>

<head>

<title> TEXT LINKING </title>

</head>

<hr><BODY BACKGROUND ="white">

<B><FONT COLOUR= RED><H1 ALIGN = CENTRE> BIKE WORLD </H1>

</B></FONT COLOUR>

<img border ="3" src="f:/paste/f01.jpg" />

<A HREF="output6.html"> next view </A>

</BODY>

</HTML>

Submitted by: Anjleen virdi Page 19


e-commerce practical file 2010

OUTPUT A:

On clicking next view, it gives us the next output B.

OUTPUT B:

Submitted by: Anjleen virdi Page 20


e-commerce practical file 2010

AIM 5b: To show reverse linking with same pages.

<html>

<head>

<title> TEXT LINKING </title>

</head>

<hr><BODY BACKGROUND ="white">

<B><FONT COLOUR= RED><H1 ALIGN = CENTRE> BIKE WORLD </H1>

</B></FONT COLOUR>

<img border ="3" src="f:/paste/f02.jpg" />

<A HREF="output5.html"> last view </A>

</BODY>

</HTML>

Submitted by: Anjleen virdi Page 21


e-commerce practical file 2010

OUTPUT B:

On clicking “last view” it goes back to output A

OUTPUT A:

Submitted by: Anjleen virdi Page 22


e-commerce practical file 2010

AIM 6: To show linking with Images.

<html>

<head>

<title> IMAGE LINKING </title>

</head>

<hr><BODY BACKGROUND ="pink">

<B><FONT COLOUR= BLACK><H1 ALIGN = CENTRE> IMAGE


LINKING </H1>

</B></FONT COLOUR>

<A HREF="f:/paste/ff.jpg"><img border ="3" src="f:/paste/ff1.bmp" />


</A>

</BODY>

</HTML>

Submitted by: Anjleen virdi Page 23


e-commerce practical file 2010

Submitted by: Anjleen virdi Page 24


e-commerce practical file 2010

OUTPUT:

ON clicking image, we get

OUTPUT:

Submitted by: Anjleen virdi Page 25


e-commerce practical file 2010

AIM 7: Event handling with mouse click.

<html>

<head>

<script type="text/javascript">

function changetext(id)

id.innerHTML="Ooops!";

</script>

</head>

<body>

<h1 onclick="changetext(this)">Click on this text</h1>

</body>

</html>

Submitted by: Anjleen virdi Page 26


e-commerce practical file 2010

OUTPUT:

ON CLICKING ON THIS TEXT WE GET:

Submitted by: Anjleen virdi Page 27


e-commerce practical file 2010

AIM 8: Program to calculate the result using event handling

<html>

<title></title>

<head>

<script language="javascript" type="text/javascript">

function calc()

{var a;

var b;

var c;

a=parse int(document.f1.tb1.value);

b=parse int(document.f1.tb2.value);

c=a+b;

c=parse int(document.f1.tb3.value);

</script></head>

<body>

<form name="f1" method="post">

<form name="f1" method="get">

enter first number

<input type="text" name="tb1" value=""/><br>

enter second number

<input type="text" name="tb2" value=""/><br>

result

<input type="text" name="tb3" value=""/>

<input type="button" name="bt1" value="calc" onclick="calc()";/>

</form></body></html>

Submitted by: Anjleen virdi Page 28


e-commerce practical file 2010

OUTPUT:

Submitted by: Anjleen virdi Page 29


e-commerce practical file 2010

AIM 9: WEBSITE MANUAL.(afterbtech.com)

HOME PAGE

Submitted by: Anjleen virdi Page 30


e-commerce practical file 2010

Page 1:

On clicking M.Tech we get lower page,


On clicking HOME icon we goes back to HOME page
On clicking BACK icon we goes back to Page1.

Submitted by: Anjleen virdi Page 31


e-commerce practical file 2010

On clicking M.S. we get lower page,

On clicking M.B.A we get,

Submitted by: Anjleen virdi Page 32


e-commerce practical file 2010

On clicking I.A.S/I.P.S, we get

Submitted by: Anjleen virdi Page 33

You might also like