Q.1) Basic HTML Tags Welcome
Q.1) Basic HTML Tags Welcome
<html>
<head>
</head>
<body>
<h1>Web Designing</h1>
<h2>Application creation</h2>
</P>
<font face="monotype corsiva" size="5" color="0000FF" <p align="justify"><U> "Life is not a bed of
roses".</U></font></p>
<font face="monotype corsiva" size="5" color="00ffFF" <p align="right"> <U>"Life is not a bed of
roses".</u></font></p>
<font face="monotype corsiva" size="5" color="ff0000 "<p align="left"> <B> "Life is not a bed of
roses".</B></font></p>
<font face="monotype corsiva" size="5" color="000000" <p align="center"><I><B> "Life is not a bed of
roses".</I></B></font></p>
<body BGCOLOR="660033">
<a href="frame4.html">PAGE1</font></a>
<a href="http://www.google.com">PAGE1</a>
<a href="form1.html"><img src="orch.jpg "></a>
</body>
</html>
</head>
<body>
<tr>
</td>
<td bgcolor="ffooff">
</td>
<td><font color="ffooff">debasree!!!<td>
</td>
</tr>
</table>
</body>
</html>
Q.3) Course details using frames
<html>
<head>
</head>
<frameset cols="50%,50%">
<frame src="tablecolor.html">
<frameset rows="20%,80%">
<frame src="tablepics.html">
<frameset rows="50%,50%">
<frameset rows="60%,20%">
<frame src="table.html">
<frame src="tablepics.html">
<frameset rows="50%,30%>
<frame src="table.html">
</frameset>
</frameset>
</table>
</body>
Q.4) Webpage to display a form
<html>
<head>
<title>Untitled Document</title>
</head>
<body bgcolor="#FF00FF">
<p>First name
</p>
<p>Last name
</p>
<p>Gender: Male
Female
</p>
<p>Specialization: Finance
Systems
International Business
Acturials
</p>
<p>Nationality </p>
<p>
<option>Indian</option>
<option>American</option>
<option>Japanese</option>
<option>Chinese</option>
<option>African</option>
<option>Chillean</option>
<option>Britian</option>
</select>
</p>
<p>Attachments:
</p>
<p> </p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>
<html>
<head>
<style type="text/css">
img.x
position:absolute;
left:0px;
top:0px;
z-index:-1;
</style>
</head>
<body>
<h1>This is a heading</h1>
</body>
</html>
<html>
<body>
<h1 onmouseover="style.color='red'"
onmouseout="style.color='green'">
</body>
</html>
Q.7) Create a web page which changes the size of the image on mouse actions.
<html>
<head>
<script type="text/javascript">
function changeSize()
document.getElementById("compman").height="250"
document.getElementById("compman").width="300"
</script>
</head>
<body>
<br/><br/>
<input type="button" onclick="changeSize()" value= "change the height and width of the
image">
</body>
</html>
<html>
<head>
body
background-image:
url('image.jpg');
background-repeat;
no-repeat;
background-attachment:
fixed
</style>
</head>
</body>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
<p> the image will not scroll with the rest of the page</p>
Q.9) Create a form to get user input and validate it using JavaScript
<html>
<head>
<title>Create Form</title>
<script type="text/javascript">
function validate()
var name=document.formvali.name.value;
var phonenum=document.formvali.phone.value;
var email=document.formvali.email.value;
document.formvali.submit();
function empty(field1,field2)
if(field1 =="")
return false;
return true;
}
function mlist(field1,field2)//mlist-menulist
if(field1==0)
return false;
return true;
//VALIDATION OF NUMBER
if(isNaN(field1))
alert("Reenter your"+field2)
return false;
return true;
if(field1.length<10)
return false;
}
return true;
//VALIDATION OF EMAIL ID
function checkemail()
if(document.formvali.email.value.indexOf('@')==-1)
return false
return true
</script>
</head>
<body>
<p><u><b>Form Validation</b></u></p>
<p>
Name
<p>Phone
<br>
Email Id
<option value="1">1</option>
<option value="2">2</option>
</select></p>
<p> </p>
<br>
</p>
</form>
<p> </p>
<p> </p>
</body>
</html>
thankyou.htm
<html>
<head>
</head>
<body>
</body>
</html>
Q.10) Create a webpage that changes the foreground and background color using Vbscript.
<html>
<head>
<script type="text/javascript">
function bgChange(bg)
document.body.style.background=bg;
</script>
</head>
<body>
<b>Mouse over the squares and the background color will change!</b>
<tr>
<td onmouseover="bgChange('maroon')"
onmouseout="bgChange('yellow')"
bgcolor="red">
</td>
<td onmouseover="bgChange('blue')"
onmouseout="bgChange('pink')"
bgcolor="yellow">
<td onmouseover="bgChange('green')"
onmouseout="bgChange('blak')"
bgcolor="pink">
</td>
</tr>
</table>
</body>
</html>
<html>
<body>
<script type="text/vbscript">
sometext="Goodmorning Everyone!!"
document.write(strReverse(sometext))
</script>
</body>
</html>
Q.12) Write an ASP code for storing student information in to the database.
<html>
<head>
<title>Create Form</title>
<script type="text/javascript">
function validate()
var name=document.fotmvali.name.value;
var phonenum=document.formvali.phone.value;
var email=document.formvali.email.value;
document.formvali.submit();
}
}
function empty(field1,field2)
if(field1=="")
return false
return true;
//VALIDATION OF NUMBER
function phone(field1,field2)
if(isNan(field1))
alert("Reenter your"+field2)
return false;
return true;
function phonelength(field1,field2)
if(field1.length<10)
return true;
//VALIDATION OF EMAIL ID
function checkemail()
if(document.formvali.email.value.indexOf('@')==-1)
return false
return true
</script>
</head>
<body>
<p><u><b>Form Validation</b></u></p>
<form method="POST"action="insert.asp"name="formvali">
<p>
student
Name
<input type="text"name="name"size="20"></p>
<p>student
phone
<input type="text"name="phone"size="10"><br>
<br>
Student
Email Id
</form>
<p> </p>
</body>
</html>
Insert.asp
<Html>
<head>
'Set an active connection to the connection object. Give the correct folder name and database
name
Server.MapPath("Database/formvalidb.mdb")%>
</head>
<body>
<%
Name=Trim(request.form("name"))
phone=Trim(request.form("phone"))
email=Trim(request.form("email"))
<table>
<tr>
<td colspan="2"height="350">
<div align="center">
<p> </p>
<p><a href="student-info.htm">Home</a></p>
</div>
</td>
</tr>
</table>
</body>
</html>