Web Technology Assignment
Web Technology Assignment
<!DOCTYPE html>
<html>
<head> <title> Table format </title>
<style>
table, tr, th{
border:2px solid black;
border-collapse:collapse;
width:500px;}
</style>
</head>
<body>
<table border="1">
<tr> <th> Class </th> <th>Subject 1 </th> <th> Subject 2 </th>
<th> Subject 3 </th> </tr>
<tr> <th> BCA I </th> <th>Visual Basic </th> <th> PC Software </th >
<th> Electronics</th> </tr>
<tr> <th> BCA II</th> <th>C++</th> <th> DBMS </th> <th> English</th>
</tr>
(I) C
(II) C++
(III) Fortran
(IV) COBOL
<!DOCTYPE html>
<html>
<head><title> list format </title>
</head>
<body>
<ol type="I">
<li> C </li>
<!DOCTYPE html>
<html>
<head><title> list format </title>
</head>
<body>
<ol type="1">
<!DOCTYPE html>
<html>
<head><title> hyper link format </title>
</head>
<body>
<!DOCTYPE html>
<html>
<head> <title> frame format </title>
</head>
<frameset cols="30%,30%,40">
</frameset>
</html>
Output: -
Q6. Write an HTML program to create a web page with a blue background and
the following text.
New Delhi
New Delhi, the capital and the third largest city of India is fusion of the
ancient and the modern. The refrain of the Muslim dynasties with its architectural
delights, give the majestic ambience of the bygone era.
<!DOCTYPE html>
Output: -
Admission
<!DOCTYPE html>
<html>
<head> <title> paragraph</title>
<style>
table, tr, th, td{
border: 2px solid black;
border-collapse:collapse;
width:600px;
height:20px;}
</style>
<body>
<i> <u>
<h1 align="center" >Admission
</h1></u>
</i>
<table>
<tr> <th> Course</th> <th>OB</th> <th>BC</th> <th> MBC</th>
<th> SC/ST</th> <th>TOTAL </th></tr>
Output: -
<!DOCTYPE html>
<html>
<head> <title> paragraph</title>
<style>
</style>
</head>
<body>
<u>
<h1 align="center" >Car Price List
</h1></u>
<table align="center">
<tr> <th colspan="2">Maruti</th> <th colspan="2">Tata</th>
<th colspan="2">Ford</th> </tr>
<!DOCTYPE html>
<html>
<head> <title> table formate</title>
<style>
table, tr, th, td{
border: 2px solid black;
border-collapse:collapse;
width:400px;
height:20px;}
td{
text-align:center;}
</style>
</head>
<body>
<table align="center">
<tr> <th>Name</th> <th>Subject</th> <th>Marks</th> </tr>
Output: -
Q10. Create the HTML document and embed a flash movie in it.
<!DOCTYPE html>
<html>
<head> <title> flash movies</title>
</head>
<body>
Output: -
<!DOCTYPE html>
<html>
<head> <title> Table format</title>
<style>
<table align="center">
<tr> <th >Subject</th> <th >Max</th> <th >Min</th> <th
>obtain</th> </tr>
Name Rahul
<!DOCTYPE html>
<html>
<head> <title> Table format</title>
<style>
th, td{
text-align:left;}
</style>
</head>
<body >
<u>
<h1 align="center" >Student records
</h1></u>
<table align="center">
<tr> <th colspan="2">Name</th> <th colspan="2"
>Rahul</th> </tr>
</body>
</head>
</html>
Output:-
Enter Name:
Enter Age:
Output: -
<!DOCTYPE html>
<html>
<head><title> paragraph</title>
</head>
<body background="C:\Users\Public\Pictures\Sample Pictures\Desert.jpg">
<h1 align="center" > <u>New Delhi </u></h1>
<p>
New Delhi, the capital and the third largest city of India is fusion of the
ancient and the modern. The refrain of the Muslim dynasties with its
paced. The most fascinating of all is the character of Delhi which varies from
the 13th present century mausoleum of the Lodi kings to ultra modern glass
skyscrapers.
</p>
</body>
</html>
output:-
Output: -
<!DOCTYPE html>
<html>
Output:-
<!DOCTYPE html>
<html>
<head><title> list
</title>
</head>
<body>
<table width="300" >
<tr>
<td> Enter your name:</td> <td> <input type="text"> </td>
</tr>
<tr>
<td>Enter your roll no:</td> <td><input type="password"></td>
</tr>
</table>
Subjec t: <br/>
<input type="checkbox" name="subject">Java <br/>
<br>
<br>
Class:<select>
</select><br /><br/><br/><br/>
<!DOCTYPE html>
<html>
<head><title> list
</title>
</head>
<body><br/> <br/>
C<sub>2</sub>H<sub>5</sub>OH
+PCL<sub>5</sub>=C<sub>2</sub>H<sub>5</sub>CL
+POCL<sub>3</sub>+HCL
<br/>
4H<sub>3</sub>PO<sub>3</sub>=3H<sub>3</sub>PO<sub>4</sub>
+PH<sub>3</sub>
<br/>
PCL<sub>3</sub>+CL<sub>2</sub>=PCL<sub>5</sub>
</body>
</html>
Output: -
<!DOCTYPE html>
<html>
<head><title> list format </title>
</head>
<body> <ol type="1">
<li>Actors<br/><ol type="1">
<li>Bruce Willis</li>
<li>Gerard Butler </li>
<li>Vin Diesel </li>
<li>Bradd pitt </li></ol> </li>
<li>Actress<br/><ol type="1">
<li>Julia Roberts</li>
<li>Angelina Jolie </li>
<li>Kate Winslet </li>
<li>Cameron Diaz </li> </ol> </li>
</body>
<html>
Output: -
1. Cricket players
1. Batsman
1. SachinTendulkara
2. Rahul Dravid
3. Virendrasehwag
2. Bowler
1. Kumbale
2. Zaheer Khan
3. Balaji
3. Spinner
1. Harbhajan
2. Kumbale
3. Jadeja
<!DOCTYPE html>
<html>
<head><title> list format </title>
</head>
<body> <ol type="1">
<li>Cricket players<br/><ol type="1">
<li>Batsman<ol type="1">
<li>SachinTendulkara</li>
<li>Rahul Dravid </li>
<li>Bowler<br/><ol type="1">
<li>Kumbale</li>
<li>Zaheer Khan</li>
<li>Balaji</li></ol> </li>
JAVA-SCRIPT
Q 1 Write a script to usingfor loop to print 1 to 50.
Answer:-
Coding for the Program (Using java-script):-
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
document.write("The number 1 to 50 <br/>");
for(i=1;i<=50;i++)
{
document.write( i );
if(i<=10)
{document.write(" ");
}
document.write(" ");
if(i==10||i==20||i==30||i==40)
document.write("<br/><br/>");
}
</script>
</body>
</html>
</script>
</body>
</html>
Output:-
</script>
</body>
</html>
Output:-
Answer:-
Coding for the Program (Using java-script):-
<!DOCTYPE html>
<html>
<bodystyle=" font-size:30px;" >
<p id="demo"></p>
<script>
</body>
</html>
Output:-
<html>
<body>
<script>
function validateform()
{
var name=document.getElementById("name");
var password=document.getElementById("password");
if (name.value==null || name.value=="")
{
alert("Name can't be blank");
return false;
}
else if(password.value.length<6)
{
alert("Password must be at least 6 characters long.");
return false;
}
}
</script>
<body>
<form method="get" onsubmit="return validateform()" action="register.html">
<table>
<tr>
<td>
Enter Name: </td><td><input type="text" id="name"/></td></tr>
<tr><td>
Password: </td><td><input type="password" id="password"/></td></tr>
</table>
<input type="submit" value="submit">
</form>
</body>
</html>
Register.html file
<!DOCTYPE html>
</script>
</body>
</html>
Output:-
After submit:-
Answer: -
<!DOCTYPE html>
<html>
<head>
#first{
text-align: center;
width:500px;
background-color:rgba(123,12,245,.5);
}
#first:hover{
background: yellow;
}
</style>
</head>
<body>
<center>
<h1 id="first" >This is heading </h1>
</center>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function effect(){
var x=document.getElementById("first");
x.style.backgroundColor="red";
x.style.fontSize="40px";
}
function eback(){
var x=document.getElementById("first");
x.style.backgroundColor="rgba(123,12,245,.5)";
x.style.fontSize="30px";
}
</script>
</head>
<body>
<center>
<h1 id="first" onmouseover="effect()" onmouseout="eback()">This
is heading </h1>
</center>
</body>
</html>
When we set the position relative to an element, without adding any other positioning
attributes (top, bottom, right, left) nothing will happen. When we add an additional
position, such as left: 20px the element will move 20px to the right from its normal
position. Here, we can see that this element is relative to itself. When the element moves,
There is a thing we should keep in mind while setting position - relative to an element limits
the scope of absolutely positioned child elements. This means that any element that is the
In this example, you will see how the relatively positioned element moves when its
attributes are changed. The first element moves to the left and top from its normal
position, while the second element stays in the same place because none of the additional
Output: -
After relative position left: 30px; top: 70px; moved the first element from his exact
position.
</script>
<style>
#first_element
{
background-Color:red;
width:400px;
height:100px;
}
center
{
position:absolute;
top:5%;
left:8%;
}
</style>
</head>
<body>
<div id="first_element" oncontextmenu="effect();">
<center style="font-size:30px;"> Right Click Here</center>
</div>
</body>
</html>
<style type="text/css">
#clock{
width:800px;
margin:150px;
text-align:center;
font-size:150px;
}
</style>
</head>
<body>
<div id="clock"> </div>
<script type="text/javascript">
setInterval(displayclock , 500);
function displayclock() {
var time = new Date();
var hrs = time.getHours();
var min = time.getMinutes();
var sec = time.getSeconds();
if(hrs>12){
hrs=hrs - 12;
}
if(hrs==0)
{
hrs = 12;
}
if(hrs<10)
{
hrs= '0'+ hrs;}
if(min<10)
</script>
</body>
</html>
Output:-
$sum=0;
echo"<h2>sum of first 30 digit is :- </h2>";
for($i=1;$i<=30;$i++)
{ $sum=$i+$sum;
echo"$i";
if($i<30)
{
echo"+";
}
if($i>=30)
{
echo"= $sum";
}
}
echo" <h2>sum of 1 to 30 number is : $sum</h2>";
?>
Output:-
Output:-
Output:-
Output:-
$input = 1235321;
$num = palindrome($input);
if($input==$num)
{
echo "$input is a Palindrome number";
} else {
echo "$input is not a Palindrome";
}
?>
Output:-