Sie sind auf Seite 1von 18

Experiment No 1

Exercise 1
<html>
<head><title>Exercise 1</title>
</head>
<body>
<h1>Hello</h1>
</body>
</html>

Exercise 1.1

Coding for front page


<html>
<head><Title>Exercise 2</title>
</head>
<font face="Segoe UI">
<body>
<center><h1>Information Technology</h1></center>
<h2>Second Year Semester IV</h2>
<ol>
<li><a href="Computational Mathematics.html">Computational
Mathematics-IV(CM)</a>
<li><a href="Principles of Communication.html">Principles of
Communication(PCOM)</a>
<li><a href="Microprocessors & Microcontrollers.html">Microprocessors
& Microcontrollers(MPMC)</a>
<li><a href="Internet Programming.html">Internet Programming(IP)</a>
<li><a href="Networking technology for digital devices.html">Networking
technology for digital devices(NTDD)</a>
<li><a href="Financial accounting & Management of technology
innovation.html">Financial accounting & Management of technology innovation(FAMT)</a>
</ol>
</font>
</body>
</html>
Coding for computational mathematics

<html>
<head><Title>Computational Mathematics</title>
</head>
<font face="Segoe UI">
<center>
<body>
<h1>Computational Mathematics</h1>
<table border=1>
<tr>
<th>Theory Marks</th>
<th>Termwork Marks</th>
<th>Practical Marks</th>
<th>Oral Marks</th>
<th>Total Marks</th>
</tr>
<tr>
<td><center>100</center></td>
<td><center>25</center></td>
<td><center>---</center></td>
<td><center>---</center></td>
<td><center>125</center></td>
</tr>
</table>
</body>
</center>
</font>
</html>

Coding for FAMT


<html>
<head><Title>Financial accounting & Management of technology innovation</title>
</head>
<font face="Segoe UI">
<center>
<body>
<h1>Financial accounting & Management of technology innovation</h1>
<table border=1>
<tr>
<th>Theory Marks</th>
<th>Termwork Marks</th>
<th>Practical Marks</th>
<th>Oral Marks</th>
<th>Total Marks</th>
</tr>
<tr>
<td><center>100</center></td>
<td><center>25</center></td>
<td><center>---</center></td>
<td><center>---</center></td>
<td><center>125</center></td>
</tr>
</table>
</body>
</center>
</font>
</html>
Coding for Internet programming
<html>
<head><Title>Internet Programming</title>
</head>
<font face="Segoe UI">
<center>
<body>
<h1>Internet Programming</h1>
<table border=1>
<tr>
<th>Theory Marks</th>
<th>Termwork Marks</th>
<th>Practical Marks</th>
<th>Oral Marks</th>
<th>Total Marks</th>
</tr>
<tr>
<td><center>100</center></td>
<td><center>25</center></td>
<td><center>25</center></td>
<td><center>25</center></td>
<td><center>175</center></td>
</tr>

</table>
</body>
</center>
</font>
</html>
Coding for MPMC
<html>
<head><Title>Microprocessors & Microcontrollers</title>
</head>
<font face="Segoe UI">
<center>
<body>
<h1>Microprocessors & Microcontrollers</h1>
<table border=1>
<tr>
<th>Theory Marks</th>
<th>Termwork Marks</th>
<th>Practical Marks</th>
<th>Oral Marks</th>
<th>Total Marks</th>
</tr>
<tr>
<td><center>100</center></td>
<td><center>25</center></td>
<td><center>---</center></td>
<td><center>---</center></td>
<td><center>125</center></td>
</tr>

</table>
</body>
</center>
</font>
</html>
Coding for NTDD
<html>
<head><Title>Networking technology for digital devices</title>
</head>
<font face="Segoe UI">
<center>
<body>
<h1>Networking technology for digital devices</h1>
<table border=1>
<tr>
<th>Theory Marks</th>
<th>Termwork Marks</th>
<th>Practical Marks</th>
<th>Oral Marks</th>
<th>Total Marks</th>
</tr>
<tr>
<td><center>100</center></td>
<td><center>25</center></td>
<td><center>25</center></td>
<td><center>25</center></td>
<td><center>175</center></td>
</tr>
</table>
</body>
</center>
</font>
</html>
Coding for pcom
<html>
<head><Title>Principles of Communication</title>
</head>
<font face="Segoe UI">
<center>
<body>
<h1>Principles of Communication</h1>
<table border=1>
<tr>
<th>Theory Marks</th>
<th>Termwork Marks</th>
<th>Practical Marks</th>
<th>Oral Marks</th>
<th>Total Marks</th>
</tr>
<tr>
<td><center>100</center></td>
<td><center>25</center></td>
<td><center>---</center></td>
<td><center>---</center></td>
<td><center>125</center></td>
</tr>

</table>
</body>
</center>
</font>
</html>

Exercise 1.3
<html>
<head><title>ICICI Registration</title>
</head>
<body>
<center>
<h1>Registration</h1>
<form>
<fieldset>
<table>
<tr>
<td>Name</td>
<td><input type="text" value="First Name" name="firstname">
<input type="text" value="Last Name" name="lastname"></td>
</tr>
<tr>
<td>Sex</td>
<td><select>
<option value="None">- Select One-</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</td>
</tr>
<tr>
<td>Birthday</td>
<td>
<input type="text" value="Date" size="2" name="date"><input type="text" value="Month"
size="3" name="month"><input type="text" size="3" value="Year" name="year"></td>
</tr>
<tr>
<td>Login name</td>
<td><input type="text" name="user"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="pass"></td>
</tr>
<tr>
<td>Confirm Password</td>
<td>
<input type="pass" name="conpass"></td>
</tr>
<tr>
<td><input type="submit" name="submit"></td>
</tr>
</table>
</fieldset>
</form>
</center>
</body>
</html>
EXPERIMENT NO 2
Exercise 2.1
Style & Frames
<html>
<head>
<title>Styles & Frames</title>
</head>
<frameset cols="25%,50%,25%">
<frame src="frame_a.html" />
<frame src="frame_b.html" />
<frame src="frame_c.html" />
</frameset>
</html>
Coding for first frame
<html>
<head>
<style type="text/css">
h1 {color:#FF0000;}
p {color:#0000FF;}
body {background-color:#FFEFD6;}
</style>
<style type="text/css" media="print">
h1 {color:#000000;}
p {color:#000000;}
body {background-color:#FFFFFF;}
</style>
</head>
<body>
<h1>Header 1</h1>
<p>A paragraph.</p>
</body>
</html>
Coding for second frame
<html>
<head>
<style type="text/css">
span.blue {color:red;font-weight:bold;font-family:"Old English Text MT"}
span.green {color:lightskyblue;font-weight:bold;font-family:"Segoe UI"}
</style>
</head>
<body bgcolor="purple">
<p>My mother has <span class="blue">light blue</span> eyes and my father has <span
class="green">dark green</span> eyes.</p>
</body>
</html>
Coding for third Frame
<html>
<body background="LeatherHoles-Apple.png">
<h3>This is a header</h3>
<p>This is a paragraph.</p>
<div style="color:#00FF00">
<h3>This is a header</h3>
<p>This is a paragraph.</p>
</div>
</body>
</html>

Exercise 2.2
<html>
<body >
<img src="800px-Continental_models.gif" alt="continents" usemap="#continentmap"/>
<map name="continentmap">
<area shape="rect" coords="711,259,781,277" href="http://en.wikipedia.org/wiki/Australia_
%28continents%29"/>
<area shape="rect" coords="653,127,691,145" href="http://en.wikipedia.org/wiki/Asia"/>
<area shape="rect" coords="301,74,360,91" href="http://en.wikipedia.org/wiki/Europe"/>
<area shape="rect" coords="149,243,216,280"
href="http://en.wikipedia.org/wiki/South_America"/>
<area shape="rect" coords="363,348,446,367" href="http://en.wikipedia.org/wiki/Antartica"/>
</map>
</body>
</html>
Experiment 3

Exercise 3.1
<html>
<head>
<style>
body
{
background-color:blue;
}
h1
{
background-color:red;
letter-spacing:200px;
text-align:right}
h2
{
background-color:white;
letter-spacing:20px;
text-align:center}
p.big
{
color:black;
line-height:500%;
word-spacing:200px}
</style>
</head>
<body>
<h1>CSS</h1>
<h2>HTML</h2>
<p class="big">
Line Height:It is used to<br>set distance line<br>in any text in awebpage
</p>
</body>
</html>
Exercise 3.2
<html>
<head>
<style typr="text/css">
table,td,th
{
border:2px solid black;
}
td
{
height:50px;
vertical-align:center;
}
th
{
height:40px;
vertical-align:center;
}
</style>
</head>
<body>
<center>
<table>
<tr>
<th colspan="7">XYZ College of Engg</th>
</tr>
<tr>
<th colspan="7">Statement of marks</th>
</tr>
<tr>
<th colspan="3" style="text-align:left">Roll No:</br>
Name:</th>
<th colspan="4" style="text-align:left">
Sem:</br>Branch:
</th>
</tr>
<tr>
<th rowspan="3">Subject Name</th>
<th colspan="6">Marks</th>
</tr>
<tr><th colspan="2">Termwork</th>
<th colspan="2">oral</th>
<th colspan="2">theory</th>
<tr>
<td>Min</td>
<td>Obtained</td>
<td>Min</td>
<td>
Obtained</td>
<td></tr>
<tr>
<td>
Subject 1</br>Subject 2</br>Subject 3
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</center>
</table>
</body>
</html>

Experiment no4
1. Code to display the height of image using pixel value
<html>
<head>
<style type="text/css">
img.normal{height:500px}
h2{height:20px;width:50px}
</style>
</head>
<body>
<img class="normal" width="500px" src="Sunset.jpg"/ >
<h2> SHAPE of the ELEMENT</h2>
</body>
</html>
2.code to display an element as ablock element

<html>
<head>
<style type="text/css">
span
{
display:block;
}
</style>
</head>
<body>
<span>span is used for dividing the individual content</span> <span>a line break between the
two elements.</span>
</body>
</html>
3.Code Position an elemnt relative to the browser window
<html>
<head>
<style type="text/css">
h2.pos_left
{
position:relative;
left:100px;
}

h2.pos_right
{
position:relative;
right:20px;
}
</style>
</head>
<body>
<h2 class="pos_right">RELATIVE</h2>
<h2 class="pos_left">RELATIVE LEFT</h2>
</body>
</html>

4.code to set the shape of an element


<html>
<head>
<style type="text/css">
img.normal{height:500px}
h2{height:20px;width:50px}
</style>
</head>
<body>
<img class="normal" width="500px" src="Sunset.jpg"/ >
<h2> SHAPE of the ELEMENT</h2>
</body>
</html>
5.code to change the cursor
<html>
<body>
<p> move cursor over text</p>
<span style="cursor:auto">auto </span>
<br>
<span style="cursor:crosshair">crosshair</span>
<br>
<span style="cursor:help">help</span><br>
<span style="cursor:pointer">pointer</span>
</body>
</html>
5.create the image gallery with float property
<html>
<head>
<style type="text/css">
img
{
float:right;
}
</style>
</head>
<body>
<div width="200px" height="100px" >
<a target="_blank" href="a.html"><img src="a.jpg" alt="Sunset" /></a>
</div>
<div width="200px" height="100px" >
<a target="_blank" href="Sunset.html"><img src="Sunset.jpg" alt="Sunset" /></a>
</div>
</body>
</html>

EXPERIMENT NO 5
1. Display “Hello World”
<html>
<head><title>Hello World</title>
</head>
<body>
<script type="text/javascript">
{
document.write("Hello World!!");
}
</script>
</body>
</html>
2.Call remote javascript at some address
External HelloWorld.html
<html>
<head>
<title>Remote Hello World</title>
</head>
<body>
<h1>External JavaScript</h1>
<script src = "helloWorld.js">
</script>
</body>
</html>
Helloworld.js
document.write("Hello World!!");

3.call a function if condition1 equals 0is true otherwise exit


<html>
<head>
<title>Condition</title>
</head>
<body>
<script type = "text/javascript">
{
var a = 3;
var b = 2;
var c = a - b;
if(c == 0)
{
document.write("Difference is 0");
}
else
{
window.close();
}
}
</script>
</body>
</html>

4.Different forms of for loop


<html>
<body>
<script type="text/javascript">
var i=0;
for (i=0;i<=5;i++)
{
document.write("The number is " + i);
document.write("<br />");
}
</script>
<br/>
<script type="text/javascript">
var p={fname:"ABC",age:20};
for (x in p)
{
document.write(p[x] + " ");
}
</script>
</body>
</html>
5.Multiline comment
<html>
<body>
<script type="text/javascript">
/*
The code below will calculate sum of
2Nos and display it.
*/
var a = 2;
var b = 3;
document.write("Sum is " + (a+b));
</script>
</body>
</html>

6.Round off
<html>
<body>
<script type="text/javascript">
document.write("Round off 8.125 is " + Math.round(8.125));
</script>
</body>
</html>
7.status bar

<html>
<head><title>Hello World</title>
</head>
<body>
<script type="text/javascript">
{
window.status='Happy New Year......!';
}
</script>
</body>
</html>
8.Alert Box
<html>
<head><title>Hello World</title>
</head>
<body>
<script type="text/javascript">
{
alert("Good Morning")
}
</script>
</body>
</html>
9.display marks of 10 student in tabular form

<html>
<head>
<link rel="stylesheet" type="text/css" href="table.css"/>
</head>
<body>
<script type="text/javascript">
var i=0;
var student=new Array();
var marks=new Array();
student[0]="Taha";
student[1]="Sankalp";
student[2]="Aquib";
student[3]="Chirag";
student[4]="Ansujit";
student[5]="Ravindra";
student[6]="Mukund";
student[7]="pranit";
student[8]="Ashirwad";
student[9]="Salman";
marks[0]=70;
marks[1]=70;
marks[2]=70;
marks[3]=70;
marks[4]=70;
marks[5]=70;
marks[6]=70;
marks[7]=70;
marks[8]=70;
marks[9]=70;
document.write("<center><h4>Display marks of 10 student</h4><table
border=1><tr><th>"+"name"+"</th><th>"+"marks"+"</th></tr>");
for(i=0;i<=9;i++)

document.write("<tr><td>"+student[i]+"</td><td>"+marks[i]+"</td></tr></center>");
document.write("</table>");

</script>
</body>
</html>

Experiment No 6
1.
import java.io.*;
import javax.servlet.*;
public class HelloServlet extends GenericServlet
{
public void service(ServletRequest request, ServletResponse response)
throws ServletException,IOException
{
response.setContentType("text/html");
PrintWriter pw=response.getWriter();
pw.println("<B>Hello!");
pw.close();
}
}

2.
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class date1 extends HttpServlet


{
public void doGet(HttpServletRequest req ,HttpServletResponse response)
throws ServletException ,IOException
{
PrintWriter out = response.getWriter();
Date today = new Date();
out.println("<html>"+"<body><h1>Today Date is </h1>");
out.println("<br>"+today+"</br></body>"+"<html>");
}
}

Das könnte Ihnen auch gefallen