Professional Documents
Culture Documents
2) Create webpage using HTML code with an inserted image having jpeg or jpg
extension.
3) Create webpage using HTML and CSS code to show index page of college profile.
4) Create webpage using HTML and CSS codeto design web page as the layout display.
B] JavaScript
1) Create webpage of JavaScript program where background color change
automatically.
2) Create event driven JavaScript program to accept string from user and count
number of vowels in the given string.
3) Create JavaScript program of form validation, with the help of HTML properties.
4) Create event driven JavaScript program to make use of variable, inbuilt string
functions and control structure.
3) Write a PHP program to save marks of subjects in an array and display total and
percentage.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</audio>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Information form</title>
<Script type="text/javascript">
function validate_email()
{
var x = form1.em.value;
var at = x.indexOf("@");
var at_last = x.lastIndexOf("@");
var dot = x.indexOf(".");
var last_dot = x.lastIndexOf(".");
if(at<1||at<at_last||last_dot+2>x.length||last_dot<at)
{
alert("Not a Valid Email Address");
}
else
{
alert("Valid Email Address");
}
}
</script>
</head>
<body>
<h1>Information form</h1>
<from name="form1">
Your Name
<input type="text" name="t1" required>
<br><br>
Address
<textarea name="text_address" placeholder="Permanant address" required></textarea>
<br><br>
contact
<input type="tel" name="telephone" maxlength="10">
<br><br>
Email
<input type="text" name="em" pattern="[A‐Z a‐z]{0‐9}‐[@]{1}‐[.]{1}">
<br><br>
<input type="button" name="b1" value="submit" onClick="validate_email()">
</form>
</body>
</html>
<?php
$marks=array(75,88,91,79,83);
$total=0;
$i=0;
.$marks[4] . ".";
for($i=0;$i<count($marks);$i++)
$total=$total+$marks[$i];
$per=$total*100/500;
?>
<!DOCTYPE html>
<html>
<head>
<title>Javascript</title>
</head>
<body>
<form name="f1">
Enter the string to check it is palindrome or not !
<br>
<input type="text" name="t1">
<br><br>
<input type="button" name="check_palin" value="check string"
onClick="chk_palindrome()">
</form>
<script type="text/javascript">
function chk_palindrome()
{
var str,str_case,i,len;
str=f1.t1.value;
str_case=str.toLowerCase();
len=str_case.length:
var p=1;
for(i=0;i<len/2;i++)
{
if(str_case.charAt(i)!=str_case.charAt(len‐1‐i))
{
p=0;
break:
}
}
if(p==1)
{
alert("Entered string is palindrome");
}
else
{
alert("entered string is not palindrome");
}
</script>
</html>
htmlsop1
htmlsop1
100%
10
<!DOCTYPE html5>
<html>
<head>
<title>
</title>
<meta charset="utf-8">
<style>
h2{border-style:dotted}
b{color:red;font-size:15pt}
body{background-color:pink}
u{text-decoration:overline}
p{text-align:right}
</style>
</head>
<body>
<p>
Sancheti English School & Jr. College was established in the year 1939. Sancheti English School & Jr.
College
<i>A person who never made a mistake never tried anything new</i><br><br> <u>There are no
shortcuts to any place worth going.</u><br><br> <h2>All the best for your bright future</h2>
<br><br>
</html>
<html>
<head>
<title>
Form
</title>
<meta charset="utf-8">
<style>
h2{border-style:dashed}
body{background-color:aqua}
</style>
</head>
<body>
<Form method="post">
<p>
type="text" name="lastname"><Br><br>
</p></font>
</Form>
<html>
<head>
<title>Tourisht Place</title>
<style>
section {background-color:pink;width:50%;height:50%;float:right}
aside{width:50%;float:left}
ol{font-style:italic;font size:15pt}
ul{font-weight:bold;font size:20pt}
</style>
</head>
<body>
<header style="background-color:green;height:40pt">
</header>
<br>
<aside>
<h3>City</h3>
<ol>
<li>Pune</li>
<li>Banglore</li>
<li>Hydrabad</li>
<li>Delhi</li>
</ol>
</aside>
<section>
<ul>
<li>Shanivarwada</li>
<li>Kelkar Museum</li>
<li>Sinhgad Fort</li>
</ul>
</section>
</body>
</html>
<!DOCTYPE html5>
<html>
<head>
<title>
Single Video File
</title>
</head>
<body>
<h2 align="center">Single Video File </h2>
<video src="C:\XII New Programs\Textbook\sop6\earth.mp4" controls
width="150" height="150" loop="-1" autoplay>
</video>
</body>
</html>
**********************************************************************
<!DOCTYPE html5>
<html>
<head>
<title>
Multiple Video File
</title>
</head>
<body>
<h2 align="center">
Multiple Video File on Web Page with controls
</h2>
<h2>
The text between the video tags will only be displayed in browsers that do not
support the video element.</h2>
<h3>List of video files formats</h3>
<ol>
<li>mp4 - video/mpeg</li>
<li>ogg - video/ogg</li>
<li>WebM - vfideo/webM</li>
</ol>
<video controls width="100" height="100" autoplay="">
<source src="C:\XII New Programs\Textbook\sop6\foo.mp4" type="video/mp4">
<source src="C:\XII New Programs\Textbook\sop6\earth.webm" type="video/webm">
<source src="C:\XII New Programs\Textbook\sop6\earthogg.ogg" type="video/ogg">
browser does not support the video element
</video>
</body>
</html>
<!DOCTYPE html5>
<html>
<head>
<title>
</title>
</head>
<body>
<img src="C:\Users\admin\Desktop\penguins.jpg"
usemap="#a">
<map name="a">
</body>
</html>
<html>
<body>
<h1 align="center">Person Eligible to vote or not</h1>
<form method="post" action="voteage.php">
Enter Your age
<input type="number" name="age"><br>
<input type="submit" name="submit" value="Check Eligible">
</form> </body>
</html>
**************************************************
<?php
if(isset($_POST['submit']))
{
$age = $_POST['age'];
if($age>=18)
echo "<br><br>You are Eligible to vote";
else
echo "<br><br>You are not Eligible to vote";
}
?>
<html>
<body>
<h1 align="center">Electricity Bill</h1>
<form method="post" action="lightbill.php">
Enter number of Limits (limits)
<input type="text" name="units"><br><br>
<input type="submit" name="submit" value="Calculate LightBill">
</form>
</body>
</html>
*******************************************************
<?php
if(isset($_POST['submit']))
{
$units = ($_POST['units']);
if($units<=100)
{
$bill=$units*4;
echo "Your bill Amount is .$bill";
}
else
{
if($units<=200)
{
$bill=400+($units-100)*5;
echo "Your bill Amount is .$bill";
}
else
{
$bill=400+500+($units-200)*6;
echo "Your bill Amount is .$bill";
}
}
}
?>
<!DOCTYPE html5>
<html>
<head>
<title>
Count Vowels
</title>
<script type="text/javascript">
function test()
{
var str,i,ch,count;
count=0;
str=document.frm.t1.value;
for(i=0;i<=str.length;i++)
{
ch=str.charAt(i);
if(ch=="A" || ch=="a" || ch=="E" || ch=="e" || ch=="I" || ch=="i" || ch=="O"
|| ch=="o" || ch=="U" || ch=="u")
count++;
}
alert("Number of Vowels in string are "+count);
}
</script></head>
<body bgcolor="pink"><center>
<h1>To accept string from user and count number of
vowels</h1>
<form name="frm">
Enter string<input type="text" name="t1"
required><br><br>
<input type="button" name="b" value="Counting of Vowels"
onClick="test()"></center>
</form>
</body>
</html>
<!DOCTYPE html5>
<html>
<head><title></title>
<h1>background color changes automatically</h1>
<script language="JAVASCRIPT">
function f1()
{
window.setTimeout('document.bgColor="blue"',1000);
window.setTimeout('document.bgColor="pink"',1200);
window.setTimeout('document.bgColor="green"',1400);
window.setTimeout('document.bgColor="grey"',1600);
window.setTimeout('document.bgColor="black"',1800);
window.setTimeout('document.bgColor="yellow"',2000);
window.setTimeout('document.bgColor="cyan"',2200);
}
function m()
{
window.status="It is a magic!!";
}
</script>
<body >
<center>
<form name="frm">
<input type="button" value="colors" OnMouseOver="f1()">
<input type="button" value="msg" onClick="m()">
</form>
</body>
</html>
*****************************************************
<html>
<body onLoad="f1()" onunLoad="m()">
<h1>background color changes automatically</h1>
<script language="JAVASCRIPT">
function f1()
{
window.setTimeout('document.bgColor="blue"',1000);
window.setTimeout('document.bgColor="pink"',1200);
window.setTimeout('document.bgColor="green"',1400);
window.setTimeout('document.bgColor="grey"',1600);
window.setTimeout('document.bgColor="black"',1800);
window.setTimeout('document.bgColor="yellow"',2000);
window.setTimeout('document.bgColor="cyan"',2200);
}
function m()
{
alert("UnloadPage!!");
}
</script>
</body>
</html>