e com file

35
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

Upload: anjleen-virdi

Post on 03-Apr-2015

101 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: e com file

e-commerce practical file 2010

INDEXSr.

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.

9. Website Manual

Submitted by: Anjleen virdi Page 1

Page 2: e com file

e-commerce practical file 2010

AIM1: Write all HTML TAGS.

HTML Tags Chart

Tag Name Code Example Browser View

<!-- comment<!--This can be viewed in the HTML part of a document-->

Nothing will show (Tip)

<a - anchor<a href="http://www.domain.com/">Visit Our Site</a>

Visit Our Site (Tip)

<b> bold <b>Example</b> Example

<big> big (text) <big>Example</big> Example (Tip)

<body>body of HTML document

<body>The content of your HTML page</body>Contents of your web page (Tip)

<br> line breakThe contents of your page<br>The contents of your page

The contents of your web pageThe contents of your web page

<center> center <center>This will center your contents</center> This will center your contents

<dd>definition description

<dl><dt>Definition Term</dt><dd>Definition of the term</dd><dt>Definition Term</dt><dd>Definition of the term</dd></dl>

Definition TermDefinition of the term

Definition TermDefinition of the term

<dl>definition list

<dl><dt>Definition Term</dt><dd>Definition of the term</dd><dt>Definition Term</dt><dd>Definition of the term</dd></dl>

Definition TermDefinition of the term

Definition TermDefinition of the term

<dt>definition term

<dl><dt>Definition Term</dt><dd>Definition of the term</dd><dt>Definition Term</dt><dd>Definition of the term</dd></dl>

Definition TermDefinition of the term

Definition TermDefinition of the term

<em> emphasisThis is an <em>Example</em> of using the emphasis tag

This is an Example of using the emphasis tag

<embed>embed object

<embed src="yourfile.mid" width="100%" height="60" align="center"> (Tip)

<embed>embed object

<embed src="yourfile.mid" autostart="true" hidden="false" loop="false"><noembed><bgsound src="yourfile.mid" loop="1"></noembed>

 Music will begin playing when your page is loaded and will only play one time. A control panel will be displayed to enable your visitors to stop the music.

<font> font<font face="Times New Roman">Example</font> Example (Tip)

<font> font<font face="Times New Roman" size="4">Example</font> Example (Tip)

Submitted by: Anjleen virdi Page 2

Page 3: e com file

e-commerce practical file 2010

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

<form> form

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

Name:   (Tip) 

Email: 

<h1><h2><h3><h4><h5><h6>

heading 1heading 2heading 3heading 4heading 5heading 6

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

<head>heading of HTML document

<head>Contains elements describing the document</head>

Nothing will show

<hr>horizontal rule

<hr />Contents of your web page (Tip)

Contents of your web page

<hr>horizontal rule

<hr width="50%" size="3" />Contents of your web page

Contents of your web page

<hr>horizontal rule

<hr width="50%" size="3" noshade />Contents of your web page

Contents of your web page

<hr>(Internet Explorer)

horizontal rule

<hr width="75%" color="#ff0000" size="4" />Contents of your web page

Contents of your web page

<hr>(Internet Explorer)

horizontal rule

<hr width="25%" color="#6699ff" size="6" />Contents of your web page

Contents of your web page

<html>hypertext markup language

<html><head><meta><title>Title of your web page</title></head><body>HTML web page contents</body></html>

Contents of your web page

<i> italic <i>Example</i> Example

<img> image<img src="Earth.gif" width="41" height="41" border="0" alt="text describing the image" />

 (Tip)

<input> input field Example 1: Example 1: (Tip)

Submitted by: Anjleen virdi Page 3

Submit

Page 4: e com file

e-commerce practical file 2010

<form method=post action="/cgi-bin/example.cgi"><input type="text" size="10" maxlength="30"><input type="Submit" value="Submit"></form>

 

<input>(Internet Explorer)

input field

Example 2:

<form method=post action="/cgi-bin/example.cgi"><input type="text" style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;" size="10" maxlength="30"><input type="Submit" value="Submit"></form>

Example 2: (Tip)

 

<input> input field

Example 3:

<form method=post action="/cgi-bin/example.cgi"><table border="0" cellspacing="0" cellpadding="2"><tr><td 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 3: (Tip)

<input> input field

Example 4:

<form method=post action="/cgi-bin/example.cgi">Enter Your Comments:<br><textarea wrap="virtual" name="Comments" rows=3 cols=20 maxlength=100></textarea><br><input type="Submit" value="Submit"><input type="Reset" value="Clear"></form>

Example 4: (Tip)

 

<input> input field

Example 5:

<form method=post action="/cgi-bin/example.cgi"><center>Select an option:<select><option >option 1</option><option selected>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option></select><br><input type="Submit" value="Submit"></center></form>

Example 5: Tip)

Select an

option:   

<input> input field Example 6:

<form method=post

Example 6: (Tip)

Select an option:

Submitted by: Anjleen virdi Page 4

Submit

Submit

Submit Clear

option 2

Submit

Page 5: e com file

e-commerce practical file 2010

action="/cgi-bin/example.cgi">Select an option:<br><input type="radio" name="option"> Option 1<input type="radio" name="option" checked> Option 2<input type="radio" name="option"> Option 3<br><br>Select an option:<br><input type="checkbox" name="selection"> Selection 1<input type="checkbox" name="selection" checked> Selection 2<input type="checkbox" name="selection"> Selection 3<input type="Submit" value="Submit"></form>

 Option 1

 Option 2

 Option 3

Select an option:

 Selection 1

 Selection 2

 Selection 3

<li> list item

Example 1:

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

Example 2:

<ol type="i"><li>List item 1</li><li>List item 2</li><li>List item 3</li><li>List item 4</li></ol>

Example 1: (Tip)

List item 1

o List item 2

List item 3

Example 2:

i. List item 1ii. List item 2iii. List item 3iv. List item 4

<link> link

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

<marquee>(Internet Explorer)

scrolling text

<marquee bgcolor="#cccccc" loop="-1" scrollamount="2" width="100%">Example Marquee</marquee>

(Tip)

<menu> menu

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

List item 1

o List item 2

List item 3

<meta> meta

<meta name="Description" content="Description of your site"><meta name="keywords" content="keywords describing your site">

Nothing will show (Tip)

<meta> meta <meta HTTP-EQUIV="Refresh" Nothing will show (Tip)

Submitted by: Anjleen virdi Page 5

Submit

Page 6: e com file

e-commerce practical file 2010

CONTENT="4;URL=http://www.yourdomain.com/">

<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 list

Numbered

<ol><li>List item 1</li><li>List item 2</li><li>List item 3</li><li>List item 4</li></ol>

Numbered Special Start

<ol start="5"><li>List item 1</li><li>List item 2</li><li>List item 3</li><li>List item 4</li></ol>

Lowercase Letters

<ol type="a"><li>List item 1</li><li>List item 2</li><li>List item 3</li><li>List item 4</li></ol>

Capital Letters

<ol type="A"><li>List item 1</li><li>List item 2</li><li>List item 3</li><li>List item 4</li></ol>

Capital Letters Special Start

<ol type="A" start="3"><li>List item 1</li><li>List item 2</li><li>List item 3</li><li>List item 4</li></ol>

Lowercase Roman Numerals

<ol type="i"><li>List item 1</li><li>List item 2</li><li>List item 3</li><li>List item 4</li>

Numbered

1. List item 12. List item 23. List item 34. List item 4

Numbered Special Start

5. List item 16. List item 27. List item 38. List item 4

Lowercase Letters

a. List item 1b. List item 2c. List item 3d. List item 4

Capital Letters

A. List item 1B. List item 2C. List item 3D. List item 4

Capital Letters Special Start

C. List item 1D. List item 2E. List item 3F. List item 4

Lowercase Roman Numerals

i. List item 1ii. List item 2iii. List item 3iv. List item 4

Capital Roman Numerals

I. List item 1II. List item 2III. List item 3

Submitted by: Anjleen virdi Page 6

Page 7: e com file

e-commerce practical file 2010

</ol>

Capital Roman Numerals

<ol type="I"><li>List item 1</li><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>

IV. List item 4

Capital Roman Numerals Special Start

VII. List item 1VIII. List item 2IX. List item 3X. List item 4

<option>listbox option

<form method=post action="/cgi-bin/example.cgi"><center>Select an option:<select><option>option 1</option><option selected>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option></select><br></center></form>

Select an option: (Tip)

<p> paragraph This is an example displaying the use of the paragraph tag. <p> This will create a line break and a space between lines.

Attributes:

Example 1:<br><br><p align="left">This is an example<br>displaying the use<br>of the paragraph tag.<br><br>Example 2:<br><br><p align="right">This is an example<br>displaying the use<br>of the paragraph tag.<br><br>Example 3:<br><br><p align="center">This is an example<br>displaying the use<br>

This is an example displaying the use of the paragraph tag.

This will create a line break and a space between lines.

Attributes:

Example 1: 

This is an exampledisplaying the useof the paragraph tag.

Example 2:

This is an exampledisplaying the use

of the paragraph tag.

Example 3: 

This is an exampledisplaying the use

Submitted by: Anjleen virdi Page 7

option 2

Page 8: e com file

e-commerce practical file 2010

of the paragraph tag.of the paragraph tag.

<small>small (text)

<small>Example</small> Example (Tip)

<strike>deleted text

<strike>Example</strike> Example

<strong>strong emphasis

<strong>Example</strong> Example

<table> table

Example 1:

<table border="4" cellpadding="2" cellspacing="2" width="100%"><tr><td>Column 1</td><td>Column 2</td></tr></table>

Example 2: (Internet Explorer)

<table border="2" bordercolor="#336699" cellpadding="2" cellspacing="2" width="100%"><tr><td>Column 1</td><td>Column 2</td></tr></table>

Example 3:

<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><td>Row 2</td></tr></table>

Example 1: (Tip)

Column 1 Column 2

Example 2: (Tip)

Column 1 Column 2

Example 3: (Tip)

Column 1 Column 2

Row 2 Row 2

<td> table data

<table border="2" cellpadding="2" cellspacing="2" width="100%"><tr><td>Column 1</td><td>Column 2</td></tr></table>

Column 1 Column 2

<th> table header

<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 1

Column 2

Column 3

Row 2 Row 2 Row 2Row 3 Row 3 Row 3Row 4 Row 4 Row 4

Submitted by: Anjleen virdi Page 8

Page 9: e com file

e-commerce practical file 2010

<td>Row 2</td></tr><tr><td>Row 3</td><td>Row 3</td><td>Row 3</td></tr><tr><td>Row 4</td><td>Row 4</td><td>Row 4</td></tr></table></div>

<title>document title

<title>Title of your HTML page</title>Title of your web page will be viewable in the title bar.(Tip)

<tr> table row

<table border="2" cellpadding="2" cellspacing="2" width="100%"><tr><td>Column 1</td><td>Column 2</td></tr></table>

Column 1 Column 2

<tt> teletype <tt>Example</tt> Example

<u> underline <u>Example</u> Example

<ul>unordered list

Example 1:<br><br><ul><li>List item 1</li><li>List item 2</li></ul><br>Example 2:<br><ul type="disc"><li>List item 1</li><li>List item 2</li><ul type="circle"><li>List item 3</li><li>List item 4</li></ul></ul>

Example 1:

List item 1 List item 2

Example 2:

List item 1 List item 2

o List item 3o List item 4

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

<html>

<head>

</head>

<title>HTML</title>

<h2><marquee>WELCOME TO HTML LAB</marquee>

</h2>

Submitted by: Anjleen virdi Page 9

Page 10: e com file

e-commerce practical file 2010

<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>

</table>

</body>

</html>

OUTPUT:

Submitted by: Anjleen virdi Page 10

Page 11: e com file

e-commerce practical file 2010

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

<html>

<head>

</head>

Submitted by: Anjleen virdi Page 11

Page 12: e com file

e-commerce practical file 2010

<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>

<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>

Submitted by: Anjleen virdi Page 12

Page 13: e com file

e-commerce practical file 2010

<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>

<td>book reading</td>

<td><input type="checkbox" name="check" value="book reading"></td>

</tr>

</tr>

</table>

</body>

</html>

Submitted by: Anjleen virdi Page 13

Page 14: e com file

e-commerce practical file 2010

OUTPUT:

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

<html>

<head>

</head>

<title>INFORMATION FORM</title>

Submitted by: Anjleen virdi Page 14

Page 15: e com file

e-commerce practical file 2010

<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>

</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>

Submitted by: Anjleen virdi Page 15

Page 16: e com file

e-commerce practical file 2010

<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>

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

</tr>

</tr>

<tr>

<td><input type="button" value ="submit" >

</td>

</tr>

</table>

</body>

Submitted by: Anjleen virdi Page 16

Page 17: e com file

e-commerce practical file 2010

</html>

OUTPUT:

Submitted by: Anjleen virdi Page 17

Page 18: e com file

e-commerce practical file 2010

AIM 5a: To show linking with text.

<html>

<head>

Submitted by: Anjleen virdi Page 18

Page 19: e com file

e-commerce practical file 2010

<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>

OUTPUT A:

Submitted by: Anjleen virdi Page 19

Page 20: e com file

e-commerce practical file 2010

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

OUTPUT B:

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

<html>

Submitted by: Anjleen virdi Page 20

Page 21: e com file

e-commerce practical file 2010

<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>

OUTPUT B:

Submitted by: Anjleen virdi Page 21

Page 22: e com file

e-commerce practical file 2010

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

OUTPUT A:

AIM 6: To show linking with Images.

<html>

Submitted by: Anjleen virdi Page 22

Page 23: e com file

e-commerce practical file 2010

<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

Page 24: e com file

e-commerce practical file 2010

OUTPUT:

ON clicking image, we get

OUTPUT:

AIM 7: Event handling with mouse click.

Submitted by: Anjleen virdi Page 24

Page 25: e com file

e-commerce practical file 2010

<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>

OUTPUT:

Submitted by: Anjleen virdi Page 25

Page 26: e com file

e-commerce practical file 2010

ON CLICKING ON THIS TEXT WE GET:

AIM 8: Program to calculate the result using event handling

Submitted by: Anjleen virdi Page 26

Page 27: e com file

e-commerce practical file 2010

<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>

OUTPUT:

Submitted by: Anjleen virdi Page 27

Page 28: e com file

e-commerce practical file 2010

AIM 9: WEBSITE MANUAL.(afterbtech.com)

Submitted by: Anjleen virdi Page 28

Page 29: e com file

e-commerce practical file 2010

HOME PAGE

Page 1:

Submitted by: Anjleen virdi Page 29

Page 30: e com file

e-commerce practical file 2010

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.

On clicking M.S. we get lower page,

Submitted by: Anjleen virdi Page 30

Page 31: e com file

e-commerce practical file 2010

On clicking M.B.A we get,

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

Submitted by: Anjleen virdi Page 31

Page 32: e com file

e-commerce practical file 2010

Submitted by: Anjleen virdi Page 32