Professional Documents
Culture Documents
OutPut:
Student Information
Name Address City State Phone No.
Raju 101 lig Indore M . P. 9977152360
Ram 102 mig Bhopal M.P 9977152360
</head >
<body>
<form>
<table width="100%">
<tr>
<td>
<!-- font tag is used to set the font size color -->
<FONT SIZE="4" FACE="courier"
COLOR="blue">
<MARQUEE WIDTH="100%"
BEHAVIOR="ALTERNATE" BGColor="yellow">This is an example of an alternating
marquee...</MARQUEE></FONT>
</td>
</tr>
<tr>
<td>
<FONT SIZE="4" FACE="courier"
COLOR="blue">
<MARQUEE WIDTH="100%"
BEHAVIOR="SCROLL" BGColor="yellow" LOOP="3">This is an example of a
scrolling marquee...</MARQUEE></FONT>
</td>
</tr>
<tr>
<td>
<FONT SIZE="4" FACE="courier"
COLOR="blue">
<!--
Direction attribute is used for move the text -->
<MARQUEE WIDTH="100%"
BEHAVIOR="SCROLL" DIRECTION="RIGHT" BGColor="yellow">This is an
example of a marquee scrolling to the right...</MARQUEE></FONT>
</td>
</tr>
<tr>
<td>
<!-- nested
marquee -->
<marquee direction="down"
behavior="alternate" height="150">
<marquee behavior="alternate">
<font size="7">?
</font></marquee>
</marquee>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</form>
</body>
</html>
OutPut :
3. Design a registration form using html input controls.
Registration form
Name: Age:
Contact No. Sex:
Address:
Pay By Sex:
language exp
4. Design a Xhtml table for student information .
</tr>
<tr>
<td style="width: 20%">
Ram</td>
<td style="width: 20%">
102 mig</td>
<td style="width: 20%">
Bhopal</td>
<td style="width: 20%">
M.P</td>
<td style="width: 20%">
9977152360</td>
</tr>
</table>
</body>
</html>
OutPut :
Student Information
Name Address City State Phone No.
Raju 101 lig Indore M . P. 9977152360
Ram 102 mig Bhopal M.P 9977152360
5. write a css file .
H1 {
color: white; background: teal; FONT-FAMILY: arial, helvetica, lucida-sans, sans-serif;
FONT-SIZE: 18pt; FONT-STYLE: normal; FONT-VARIANT: normal
}
H2 {
COLOR: #000000; FONT-FAMILY: verdana, helvetica, lucida-sans, sans-serif; FONT-
SIZE: 14pt; FONT-STYLE: normal; FONT-VARIANT: normal
}
H3 {
COLOR: #000000; FONT-FAMILY: lucida-sans, sans-serif; FONT-SIZE: 14pt; FONT-
STYLE: normal; FONT-VARIANT: normal
}
H4 {
COLOR: #000000; FONT-FAMILY: lucida-sans, sans-serif; FONT-SIZE: 12pt; FONT-
STYLE: normal; FONT-VARIANT: normal
}
H5 {
color: white; background: darkblue; FONT-FAMILY: lucida-sans, sans-serif; FONT-
SIZE: 12pt; FONT-STYLE: normal; FONT-VARIANT: normal
}
H6 {
color: yellow; background: green; FONT-FAMILY: lucida-sans, sans-serif; FONT-SIZE:
10pt; FONT-STYLE: normal; FONT-VARIANT: normal
}
body {
COLOR: #000000; FONT-FAMILY: lucida-sans, sans-serif; FONT-SIZE: 10pt; FONT-
STYLE: normal; FONT-VARIANT: normal; background-image: url('bkgnd.gif')
}
.localheader {
COLOR: #dddddd; FONT-FAMILY: geneva, arial, helvetica, lucida-sans, sans-serif;
FONT-SIZE: 15px; TEXT-DECORATION: none
}
.locallink {
COLOR: #dddddd; FONT-FAMILY: geneva, arial, helvetica, lucida-sans, sans-serif;
FONT-SIZE: 13px; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
.localsublink {
COLOR: #dddddd; FONT-FAMILY: geneva, arial, helvetica, lucida-sans, sans-serif;
FONT-SIZE: 11px; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
.tm {
COLOR: #000000; FONT-FAMILY: geneva, arial, helvetica, lucida-sans, sans-serif;
FONT-SIZE: 8pt; FONT-STYLE: normal; FONT-VARIANT: normal
}
A:link .nonu {
COLOR: #000000; TEXT-DECORATION: none
}
.nonuw {
COLOR: #ffffff; TEXT-DECORATION: none
}
A:visited .nonu {
TEXT-DECORATION: none
}
.linespace {
LINE-HEIGHT: 120%
}
.just {
TEXT-ALIGN: justify
}
CODE {
COLOR: #666666; FONT-FAMILY: courier, monaco, courier new; FONT-SIZE: 12pt
}
KBD {
COLOR: #666666; FONT-FAMILY: courier, monaco, courier new; FONT-SIZE: 12pt
}
6. Design an xml file.
<name> jhon</name>
<address>154 palasiya indore</address>
<phone_No>9977159054</phone_No>
<City>indore</City>
<state>mp</state>
<name> Ram</name>
<address>154 mg road indore</address>
<phone_No>9977159024</phone_No>
<City>bhopal</City>
<state>mp</state>
<name> Ram</name>
<address>154 lig colony indore</address>
<phone_No>9977159024</phone_No>
<City>indore</City>
<state>mp</state>
</student>
7. Show the message hello world using JavaScript and html.
function Message()
{
<!-- store the values of textbox in variables -->
function Confirmation()
{
confirm("You want to post back press ok otherwise press cancel");
}
function Promptmessage()
{
var name = prompt("Enter the value","");
alert(name);
}
</script>
</head>
<body>
<form>
<table width="100%">
<tr>
<td>
</td>
<td>
<INPUT type="submit" value="Message"
ID="Submit1" NAME="Submit1" onclick=" Message()">
<INPUT id="Button2" type="button"
value="Confirmation" name="Button1" onclick=" Confirmation()">
<INPUT id="Button1" type="button"
value="Prompt" name="Button1" onclick=" Promptmessage()">
</td>
</tr>
</table>
</form>
</body>
</html>
OutPut:
8. Enter the value of quantity and price and calculate total
using JavaScript.
<!-- write a program for calculation of input values and check validation -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="javascript">
<!-- function for calculate the total -->
function calulate()
{
<!-- store the values of textbox in variables -->
var price =document.getElementById("txtprice").value;
var Qty =document.getElementById("txtQty").value;
var Total =document.getElementById("txtTotal").value;
Total = price*Qty;
document.getElementById("txtTotal").value=Total;
alert("");
}
<!-- function for check the validation -->
function validate()
{
var message ="";
var check= true;
if (document.getElementById("txtQty").value=="")
{
document.getElementById("txtQty").value="0";
message="please enter value of qty ";
check =false;
}
else
{
if (document.getElementById("txtprice").value=="")
{
document.getElementById("txtprice").value=="0";
message=message+"please enter value of price";
check =false;
}
else
{
if (message=="")
{
alert("values is correct ");
}
else
{
alert(message);
}
if(check==true)
{
<!--call the function for calulate -->
calulate();
}
return check;
}
</script>
<title></title>
</head>
<body>
<form>
<table width="100%">
<tr>
<td colspan="2">
<marquee>Enter Quantity and Price and
Calculate Total</marquee>
</td>
</tr>
<tr>
<td>
Price:
</td>
<td>
<input type="text" id="txtprice"> <!--id is
give to textbox to access the value of controls -->
</td>
</tr>
<tr>
<td>
Qty:
</td>
<td>
<input type="text" id="txtQty">
</td>
</tr>
<tr>
<td>
Total:
</td>
<td>
<input type="text" id="txtTotal">
</td>
</tr>
<tr>
<td>
</td>
<td>
<INPUT type="submit" value="Calculate"
ID="Submit1" NAME="Submit1" onclick="return validate()">
<INPUT id="Button2" type="button"
value="calcuale without validation" name="Button1" onclick="return validate()">
<!--onclick event of buuton call the validate
function of javascript -->
</td>
</tr>
</table>
</form>
</body>
</html>
OutPut:
9. Gives the links for navigation from one page to another page
and apply images and css on web page using html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="test.css" />
</HEAD>
<BODY>
<table cellspacing="1" cellpadding="1" border="1" ID="Table1"
width="100%">
<tr>
<td><a href="Home.html">Home</a></td>
<td><a href="About.html">About Us</a></td>
<td><a href="Contact.html">Contact Us</a></td>
<td><a href="Registration.html">Registration</a></td>
<td><a href="Cources.html">Cources</a></td>
</tr>
<tr>
<td colspan="5"><IMG alt="Image" src="/CS-IT/Blue
hills.jpg">
</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</BODY>
</HTML>
OutPut:
Home About Us Contact Us Registration Cources
Image
10. Program for adding two numbers in JSP.
<body>
<%
int a=5;
int b=2;
int result=a+b;
out.print("Additon of a and b :"+result);
%>
</body>
</html>