Practical 12TH IT (Final)
Practical 12TH IT (Final)
Date : Principal
INDEX
Sr Title of the Experiment Page Date of Remarks Signature
No. No. Submission of In-
Charge
Experiment No. 1
Create a website using HTML5 and CSS using any 4 CSS properties. Write a code
for 2 separate pages having different file names such as first page as Index. html and
second page as page2.html. Use any theme such as college profile or company
profile etc. Every page must contain proper Meta information and design web page
as follows
1) The index page must contain a heading which is highest among other text on pages
and must be at centre of the page. There must be a paragraphwhich introduces general
information about the theme chosen must have at least 3 physical style tags and one
image with alternate text. This page must be connected to other two pages with proper
navigational links.
2) The 2nd page must contain the feedback or enrolment form related with theme
chosen with features of HTML5. The form must contain text element and email
address of the company or person. Include the submit button.
<!DOCTYPE html>
<html>
<head>
<title>Form
</title>
<meta charset="utf-8">
<meta name="author" content="Physical Tags">
<style>
h1{border-style:dashed}
body{background-color:aqua}
</style>
</head>
<body>
<h1 align="center">Enrollment Form</h1>
<form name="f1"
Enter Your Name
<input type="text" name="t1" required>
<br><br>
Enter your Email ID
<input type = "email" name="emailid"><br><br>
<input type = "submit" name ="submitbtn" value= "Submit"
</form>
<a href ="index.html">First Page </a>
</body>
</html>
Experiment No. 2
Create a webpage using HTML and CSS code to design a web page as the layout displayed
below.
The top section will display the heading , ‘Tourist places’ in header. The section on the left has
list of cities. The right hand side displays tourist places of any one of the city .
Use Inline style sheet in the top section to display background color for the text ‘Tourist
places’. Use internal stylesheet for the left and right section with background color and font
styles.
Tourist places
Page 01 (page1.html)
<!DOCTYPE html>
<html>
<head>
<title> Tourist Place </title>
<style>
section{background-color:yellow;width:50%;height:50%; float:left;color:black;font-size:30px;outline-style:solid;}
aside{background-color:pink;width:50%;height:50%; float:right;color:black;font-size:30px;outline-style:solid;}
</style>
</head>
<body>
<header style="background-color:lightblue;color:deeppink;text-align:center;
height:30%;width:100%;font-size:50px;outline-style:solid">Tourist places
</header>
<header>
<section>
<b> City </b>
<ol>
<li> Pune </li>
<li> Delhi </li>
<li> Banglore </li>
<li> Hyderabad </li>
</ol>
</section>
<aside>
<p> Tourist places in Pune </p>
<ul>
<li> Shaniwarwada </li>
<li> Sinhgad </li>
<li> Kelkar Museum </li>
</ul>
</aside>
</header>
</body>
</html>
Output
Experiment No. 3
Use of Audio on web pages using
HTML5
Create a webpage named audio.html to set an audio file in web page with controls such that it
usesHTML5 elements. The audio file must play as soon as the webpage loads in browser and
it will start over again, every time when it is completed. Create another webpage named
audio1.html which provides multiple source file formats for the same audio file that plays a
sound automaticallywith controls. The browser should display the message with appropriate
attribute, when audio file isnot supported by browser. The code must incorporate the list of
sound files formats (like wav, MP3or ogg etc).
Page02 (audio1.html)
<!DOCTYPE html>
<html>
<body>
<p> Audio Example Autoplay </p>
<audio controls muted>
<source src="C:\Users\Admin\Downloads\mixkit-a-very-happy-christmas-
897.mp3"type="audio/mp3">
</audio>
</body>
</html>
OUTPUT
Page 01 (audio.html)
Page02 (audio1.html)
Experiment No. 4
Create a webpage named video.HTML to display a video file on web page and plays
automatically with controls. The dimension of video area should be 150 * 150 pixels.
Create another webpage which provide multiple source file formats for the same audio
file that plays a sound automatically with controls. The dimension of video area should
be 100*100 pixels. The browser should display the message with appropriate attribute
when audio file is not supported by browser. The code must incorporate the list of
video files formats (like webM, MP4 or ogg etc).
Page02 (Video1.html)
<!DOCTYPE html>
<html>
<body>
<p> video Example Autoplay </p>
<Video height="420" width="460" controls>
<h2> First Video </h2>
<source src="C:\Users\Admin\Downloads\MS-Dhoni-Shorts-Status-Video.mp4"
type="video/mp4">
</video>
Page 01
Page02 :
Experiment No. 5
Navigation on an image using Client side image Mapping in web page using html 5.
<!doctype html>
<html>
<head><title>Image mapping</title>
<body>
<p> Program of Image Mapping</p>
</body>
</html>
Page2 moni.html
<!doctype html>
<html>
<head><title>Image mapping</title></head>
<body>
<p>this program of Image Mapping>
</p><br>
<p>all detail about</p>
<img src="monitor.jpg">
</body>
</html>
Page3 mou.html
<!doctype html>
<html>
<head><title>Image mapping</title></head>
<body>
<p>this program of Image Mapping>
</p><br>
<p>all detail about</p>
<img src="mouse.jpg">
<img src="mouse1.jpg">
</body>
</html>
Page4 print.html
<!doctype html>
<html>
<head><title>Image mapping</title></head>
<body>
<p>this program of Image Mapping>
</p><br>
<p>all detail about</p>
<img src="print.jpg">
</body>
</html>
Page5 syst.html
<!doctype html>
<html>
<head><title>Image mapping</title></head>
<body>
<p>this program of Image Mapping</p>
</p><br>
<p>all detail about</p>
<img src="supporting-science.jpg">
</body>
</html>
Page6 cpu.html
<!doctype html>
<html>
<head><title>Image mapping</title></head>
<body>
<p>this program of Image Mapping>
</p><br>
<p>all detail about</p>
<img src="cpu.jpg">
</body>
</html>
Page7 app.html
<!doctype html>
<html>
<head><title>Image mapping</title></head>
<body>
<p>this program of Image Mapping>
</p><br>
<p>all detail about</p>
<img src="app.jpg">
</body>
</html>
Experiment No. 6
Create a web page in HTML having a white background and two button objects. Write docume
code using Javascript such that wehen the mouse is placed over the first button objectnt.bgCo
without clicking, the color of background of the page should change after every seconds.lor="sky
There should at least 7 different and visibly distinct background colors excluding theblue";
defacultcolor. When the second button object is clicked, appropriate message should be
displayed in browser status bar.
Create another web page using JavaScript where the background color changes
automatically after every seconds. This event must be triggered automatically after the page
get loaded in the browser. There should at least 7 different and visibly distict background
colors. When the page is unloaded, the appropriate alert message should be displayed.
color.html
color1.html
Experiment No.7
Create event driven Javascript program for the following. Make use of appropriate variables,
Javascript inbuilt string functions and control structures.
To accept string from user and count number of vowels in the given string.
Handling
Create event driven Javascript program for the following. Make use of appropriate
variables, Javascript inbuilt string functions and control structures.
To accept string from user and reverse the given string and check whether it is
palindromeor not.
p
=
0
;
break;
}
}
if(p==1)
alert("String is
Palindrome");else
alert("String is not a Palindrome");
}
</script>
</html>
OUTPUT:
Experiment No.9
Create JavaScript program which compute the average marks of students. Accept six
subject marks of student from user. Calculate average marks of student which is used
to determine the corresponding grades.
Range Grade
35 to 60 F
61 to 70 D
71 to 80 C
81 to 90 B
91 to 100 A
grade.html
<html>
<head>
<title>Sop6</title>
<script type="text/javascript">
function calculate_grade()
{
var m1,m2,m3,m4,m5,m6,avg;
m1=parseInt(form1.txt_eng.value);
m2=parseInt(form1.txt_phy.value);
m3=parseInt(form1.txt_chem.value);
m4=parseInt(form1.txt_it.value);
m5=parseInt(form1.txt_bio.value);
m6=parseInt(form1.txt_math.value);
avg=(m1+m2+m3+m4+m5+m6)/6;
alert("Average marks of Six subject:" +avg);
if(avg>=91 && avg<=100)
{
grade='A';
}
else if(avg>=81 && avg<=90)
{
grade='B';
}
else if(avg>=71 && avg<=80)
{
grade='C';
}
else if(avg>=61 && avg<=70)
{
grade='D';
}
else if(avg>=35 && avg<=60)
{
grade='F';
}
alert("Grade is:" +grade);
}
</script>
</head>
<body>
<form name="form1">
<p>Enter The Six Subjects Marks</p>
English Marks:<input type="text" name="txt_eng"><br><br>
Physics Marks:<input type="text" name="txt_phy"><br><br>
Chemistry Marks:<input type="text" name="txt_chem"><br><br>
IT Marks:<input type="text" name="txt_it"><br><br>
Biology Marks:<input type="text" name="txt_bio"><br><br>
Maths Marks:<input type="text" name="txt_math"><br><br>
<input type="Submit" value="calculate avg marks and grades" onClick="calculate_grade()">
</form>
</body>
</html>
var
f=parseInt(m5);
a=(b+c+d+e+f)/5;
alert("Average Marks of Student is
"+a); if(a>=91)
alert("Grade A");
else
{
if(a>=81)
alert("Grade B");
else
{
if(a>=71)
alert("Grade C");
else
{
if(a>=61)
alert("Grade
D"); else
alert("Grade
F");
}
}
}
}
</script>
</html>
Experiment No.10
Write a PHP program to check if a person is eligible to vote or not. The program should
include the following minimum age required for vote is 18.
SOURCE CODE :
age.html
<html>
<body>
<h1 align="center">Person Eligible to vote or not</h1>
<form method="post"
action="age.php"> Enter Your age
<input type="text" name="age"><br><br>
<input type="submit" name="submit" value="Check Eligible">
</form>
</body>
</html>
age.php
<?php
if(isset($_POST['submit'
]))
{
$age=$_POST["ag
e"]; if($age>=18)
echo "<br><br>You are Eligible to
vote" else
echo "<br><br>You are not Eligible to vote"
}
?>
Output :
Enter Your age : 19
You are Eligible to vote
Experiment No. 11
Write a PHP function to count the total number of vowels (a,e,i,o,u) from the string.
Accept a string by using HTML form.
SOURCE CODE :
vowel.html
<html>
<h1 align="center">String Functions</h1>
<form method="post"
action="vowel.php"> Enter String-
<input type="text" name="str"><br><br>
<input type="submit" name="submit" value="Count Vowels">
</form>
</body>
</html>
vowel.php
<?php
if(isset($_POST['submit'
]))
{
$str = strtolower($_POST['str']);
$vowels = array('a', 'e','i', 'o', 'u');
$len = strlen($str);
$num = 0;
for($i=0;$i<$len;
$i++)
{
if(in_array($str[$i], $vowels))
{
$num++;
}
}
echo "Number of vowels:.$num";
}
?>
Output:
Enter String-english
Number of vowels: 2
Experiment No.12
Write a PHP program to save marks of English, Hindi, Marathi, Maths and
Information Technology in an array. Display marks of individual subject along
with total marks and percentage.
SOURCE CODE :
marks.php:
<!doctype html>
<html>
<body>
<?php
$a=array(60,78,74,85,96);
$t=0;
$x=0;
$c=count($a);
for($x=0;$x<$c;$x+
+)
{
echo"<br><br>Marks in subject.$a[$x]";
$t=$t+$a[$x];
}
$p=$t*100/500;
echo"<br><br> Total is:
.$t";
echo"<br><br> Percentage is: .$p";
?>
</body>
</html>
Output: