Anda di halaman 1dari 42

Index

s.no

Name of the Experiment

1.

Font style for a text

2.

Forms

3.

Image and linking with a directory

4.

Layers

5.

Order list and unordered list

6.

Developing in a table

7.

External Style Sheet

8.

Frames

Calculator

10

Asthmatic operators using JavaScript

11

Printing a table using JavaScript

12

Mouse events

13

XML using external DTD

14

Static pages for online college details

15

Program for ASP

1|Page

Page no

Aim:- Font style for a text


Sol
<html>
<head>
<title>font style</title>
<body>
<font face="arial"size="50"color="red">
hai<br>welcome to<br>
<font face="arial"color="green"size="20">
3rd mpcs<br>
</body>
</html>

2|Page

3|Page

Aim:- forms
Sol
<html>
<head>
<title>forms</title>
</head>
<body bgcolor="pink">
<form>
first name
<input type="text"name="name"size="20"><br>
last name
<input type="text"name="name"size="20"><br>
email
<input type="text"name="name"size="20"><br>
password
<input type="password"name="name"size="20">
<br>
<age>
<input type="radio"name="age"value="yes">0-25
<input type="radio"name="age"value="yes">25-30
<input type="radio"name="age"value="yes">30-35
<input type="radio"name="age"value="yes">35-40
<input type="radio"name="age"value="yes">40+
<br>
<input type="submit"value="submit">
4|Page

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

5|Page

Aim:- image and linking with a directory


Sol:<html>
<head>
<title>image linking</title></head>
<body>
<img src="C:\Documents and Settings\drndc\My
Documents\Sample
Pictures\Penguins.jpg"width="200"height="250">
<a href="D:\">D-directory</a>
</body>
</html>

6|Page

7|Page

Aim:- layers
Sol;<html>
<head>
<title>Layers demo</title>
</head>
<body>
<div style="position:relative;
font-size:50px;
left:50;
top:10;
background-color:red;
z-index:1;">samuel</div>
<div style="position:relative;
font-size:50px;
left:150;
top:3;
background-color:green;
z-index:2;">pooja</div>
<div style="position:relative;
font-size:50px;
left:200;
top:-7;
background-color:blue;
z-index:3;">laxmi</div>
8|Page

</body>
</html>

9|Page

Aim:- ordered list


Sol;<html>
<head>
<title>order list</title></head>
<body><u><h1>orderlist</h1></u>
<ol type="a">
<li>samuel</li>
<li>pooja</li>
<li>laxmi</li>
</ol>
<ol type="i">
<li>samuel</li>
<li>pooja</li>
<li>laxmi</li>
</ol>
<ol type="1">
<li>samuel</li>
<li>pooja</li>
<li>laxmi</li>
</ol>
</body>
</html>

10 | P a g e

11 | P a g e

Aim:- unordered list


Sol:<html>
<head>
<title>un order list</title></head>
<body><u><h1>un orderlist</h1></u>
<ul type="disc">
<li>samuel</li>
<li>pooja</li>
<li>laxmi</li>
</ul>
<ul type="circle">
<li>samuel</li>
<li>pooja</li>
<li>laxmi</li>
</ul>
<ul type="square">
<li>samuel</li>
<li>pooja</li>
<li>laxmi</li>
</ul>
</body>
</html>
12 | P a g e

13 | P a g e

Aim :- table creation


<html>
<head>
<title>table</title>
</head>
<body><center><h1><u>table</u></h1>
<table
align="center"width="300"border="3"cellspacing="20
"cellpading="10"bordercolor="red">
<tr>
<td>samuel</td>
<td>pooja</td>
<td>mohan</td>
<td>tarak</td>
</tr>
<tr>
<td>taraka</td>
<td>rammi</td>
<td>laxmi</td>
<td>vasu</td>
</tr></table></body></html>

14 | P a g e

15 | P a g e

AIM:PROGRAM FOR EXTERNAL STYLE SHEET


h1
{
font-family:Arial
}
h2
{
font-family:times new roman;
color:red;
left:20px
}
h3
{
font-family:arial
color:blue;
}
p
{
font-size:20pt;
font-family:Monotype Corsiva
color:green;
}
special
{
color:green
16 | P a g e

<html>
<head>
<link rel="stylesheet"
type="text/css" href="d:ex.css"/>
</head>
<body>
<h1 class="special"><center>
this page is created using external ss</center>
</h1>
<h2>
line is aligned left</h2>
<p>
it is a paragraph
</p>
<h3>
it's blue
<a href="colorname.html">color</a>line
</h3>
</body>
</html>

17 | P a g e

18 | P a g e

Aim :- Frames
<html>
<head>
<title>frames</title>
</head>
<frameset cols="150,*">
<frame src ="d:\bio data.html"name="left vertical">
<frameset rows="*,120">
<frame src="d:\frame1.html"name="right-top"
<frame src="d:\frame2.html"name="right-bottom"
</frameset>
</frameset>
</html>

19 | P a g e

20 | P a g e

Aim :- Calculator
<html>
<body><title>calculator</title>
<center><h1><u><big>calculator
<form name=<"calculator">
<table border=4>
<tr><td>
<input type="text"name="input"size="10">
<br></td><tr>
<tr><td>
<body bgcolor="green">
<input
type="button"name="one"value="1"Onclick="calcvalue+='1'">
<input
type="button"name="two"value="2"Onclick="calcvalue+='2'">
<input
type="button"name="three"value="3"Onclick="calcvalue+='3'">
<input
type="button"name="plus"value="+"Onclick="calcvalue+='+'">
<br>

21 | P a g e

<input
type="button"name="four"value="4"Onclick="calcvalue+='4'">
<input
type="button"name="five"value="5"Onclick="calcvalue+='5'">
<input
type="button"name="sixe"value="6"Onclick="calcvalue+='6'">
<input
type="button"name="x"value="*"Onclick="calcvalue+='*'">
<br>
<input
type="button"name="seven"value="7"Onclick="calcvalue+='7'">
<input
type="button"name="eight"value="8"Onclick="calcvalue+='8'">
<input
type="button"name="nine"value="9"Onclick="calcvalue+='9'">
<input
type="button"name="div"value="/"Onclick="calcvalue+='/'">
<br>
<input
type="button"name="%"value="%"Onclick="calcvalue+='%'">

22 | P a g e

<input
type="button"name="zero"value="0"Onclick="calcvalue+='0'">
<input
type="button"name="clear"value="c"Onclick="calcvalue+=''">
<input
type="button"name="doit"value="="Onclick="calcvalue+='='">
</br>
</center></body></html>

23 | P a g e

24 | P a g e

Aim :- Are thematic operators using JavaScript


<html>
<head>
<title>are thematic operators using JavaScript</title>
</head>
<body>
<center>
<script type="text/javascript">
var a,b;
a=5,b=4,c=0,d=0,f=0,g=0;
c=a+b;
d=a-b;
e=a%b;
f=a/b;
g=a*b;
string="the result=";
document.write("performing
addition,subtraction,persentage,division,multiplicaton
of 5 and 4"+"<br>");
document.write(string);
document.write(c);
document.write(d);
document.write(e);
document.write(f);
25 | P a g e

document.write(g);
</script>
</center>
</body>
</html>

26 | P a g e

Aim :- square value table


<html>
<head>
<title>square value table convert</title>
</head>
<body>
<table border="5" align=<"center">
<th>number</th><th>table</th>
<script type="text/javascript">
i=1,j=2;
while(i<=10)
{
document.write("<tr><td>"+j+"</td><td>"+(j*i)
+"</td></tr>");
i++;
}
</script>
</table>
</body>
</html>

27 | P a g e

28 | P a g e

8 Write a function that responds to a click anywhere on


the page.
PROGRAM
<html>
<body>
<center>
[<a href="/"
onMouseOver="document.bgColor='Green'">GREEN
</a>]
[<a href="/"
onMouseOver="document.bgColor='Red'">RED</a>]
[<a href="/"
onMouseOver="document.bgColor='orange'">orange<
/a>]
[<a href="/"
onMouseOver="document.bgColor='green'">brightgre
en</a>]
[<a href="/"
onMouseOver="document.bgColor='seagreen'">seagre
en</a>]
</center>
</body>
</html>

29 | P a g e

30 | P a g e

Aim :- xml using external dtd


<!ELEMENT student (name,std,marks)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT std (#PCDATA)>
<!ELEMENT marks (#PCDATA)>
Save it as student.dtd within double quotes
<?xml version="1.0"?>
<!DOCTYPE student SYSTEM "student.dtd">
<student>
<name>shiva</name>
<std>mecs</std>
<marks>369</marks>
</student>
Save it as stuentdemo.xml
And execute this xml file

31 | P a g e

32 | P a g e

Aim:Write a program using static pages for online college


course details
Sol:Home page
<html>
<head><title>book store</title></head>
<frameset rows="250,*">
<frame src="d:\webpages\welcome.html"name="topframe">
<frameset cols="150,*">
<frame src="d:\webpages\course.html"name="leftframe">
<frame src="d:\webpages\display.html"name="ightframe">
</frameset>
</frameset>
</html>
Welcome page
<html>
<head><title>home page</title></head>
33 | P a g e

<body bgcolor=pink>
<center>
<img src="C:\Documents and Settings\All
Users\Documents\My Pictures\Sample
Pictures\Sunset.jpg" width="200" height="150"
align="left">
<h1>my book store</h1>
<tr>
<td><a href="d:\webpages\login.html"
target="right-frame">login</a></td>
<td><a href="d:\webpages\registration.html"
target="right-frame">
</frameset>
</frameset>
</html>
Course page
<html>
<body bgcolor=green>
<li><a href="d:\\webpages\\mpcs.html"target="rightframeset">mpcs</a></li>
<li><a href="d:\\webpages\\mpc.html"target="rightframeset">mpc</a></li>
<li><a href="d:\\webpages\\cbz.html"target="rightframeset">cbz</a></li>
<<li><a
href="d:\\webpages\\ba.html"target="frameset">ba</a
></li>
</body>
34 | P a g e

</html>

Display page
<html>
<body bgcolor="blue">
<h1>content</h1>
<img src="C:\Documents and Settings\All
Users\Documents\My Pictures\Sample
Pictures\Winter.jpg" width=200 height=150
align="left">
<h3>
<p>this website is for displaying various courses of this
college</p>
<p>the user of this site needs to login first</p>
</h3>
</body>
</html>
Login page
<html>
<body bgcolor=green><br><br><br>
<script language="javascript">
function validate()
{
35 | P a g e

if(document.form1.id.value="//document.form1.pwd.va
lue==" ")
{
alert("please fill up the information");
document.form1.id.focus();
}
}
</script>
<form name="form1">
<div align="center">
login:<input type=text name="id"><br>
password:<input type=password name="pwd">
<br><br/>
</div>
<br>
<br>
<div align="center">
<input type="submit"value="submit"on
submit="validate()">
<input type="reset"value="reset">
</div>
</form>
</body>
</html>

36 | P a g e

homepage

Login page

37 | P a g e

38 | P a g e

Aim :- ASP program for student details


<!DOCTYPE html>
<html>
<head>
<title>student form</title>
</head>
<body>
<%
dim rno,name,sub1,sub2,sub3,tot,avg
rno=33
name="venu"
sub1=50
sub2=50
sub3=50
tot=sub1+sub2+sub3
avg=tot/3
response.write("your details are <br>")
response.write("your rolno is :"&rno &"<br>")
response.write("your name is :"&name &"<br>")
response.write("your sub1 marks are :"&sub1
&"<br>")
response.write("your sub2 marks are :"&sub2
&"<br>")
response.write("your sub3 marks are :"&sub3
&"<br>")
response.write("your total marks are :"&tot &"<br>")
response.write("your average marks are :"&avg
&"<br>")
%>
</body></html>
39 | P a g e

40 | P a g e

41 | P a g e

42 | P a g e

Anda mungkin juga menyukai