Professional Documents
Culture Documents
Web Programming 1 To 4 Practicals
Web Programming 1 To 4 Practicals
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Practical 1
1. Design a webpage that makes use of
a. Document Structure Tags
Code:
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
Output:
Page 1 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
<hr>
</font>
<h1>H<sub>2</sub>O</h1>
<h2>x<sup>2</sup>
<big>Interest
</center>
</body>
</html>
Output:
Page 2 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
</html>
Output:
3)span tag: The <span> tag is an inline container used to mark up a part of a text, or a part of a
document.
Code:
<html>
<body>
<p>This is how <span style="border:1px solid black"</span>works</p>
</body>
</html>
Output:
Page 3 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
</font>
</body></html>
Output:
Page 4 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Page 5 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Redirecting OUTPUT:
There are 3 Clickable regions(hotspots) here
Rectangle: Redirects to audio.html
Code:
<html>
<head><title>Audio Tag</title></head>
<body>
<audio src="audio.mp3"
controls autoplay loop=-1>
</audio>
</body>
</html>
Output:
Page 6 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Page 7 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Practical - 02
2. Design a webpage that makes use of
Table tags
1)Table 1:
Code:
<html>
<head><title>Monthly Savings</title></head>
<body>
<table border="1" height="200" width="200" style="background-color:#EEDD82">
<tr>
<th>Month</th>
<th >Savings</th>
</tr>
<tr>
<td>January</td>
<td>$200</td>
</tr>
<tr>
<td>February</td>
<td>$400</td>
</tr>
<tr>
<td>June</td>
<td>$345</td>
</tr>
</table>
</body>
</html>
Output:
b) Table 2:
Code:
<html>
<body>
<table border="2">
<tr><th>Name</th>
<th>Subject</th>
<th>Marks</th>
</tr>
<tr><td rowspan="3"> Mark Smith </td>
<td>English</td>
Page 8 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
<td>67</td>
</tr>
<tr>
<td>Maths</td>
<td>82</td>
</tr>
<tr>
<td>Science</td>
<td>91</td>
</tr>
</table>
</body>
</html>
Output:
c) Table 3:
Code:
<html>
<body>
<table border="2" height="350" width="350">
<tr>
<th>Month</th>
<th >Savings</th>
</tr>
<tr>
<td>January</td>
<td><a href="table.html">Click here</a></td>
</tr>
<tr>
<td>February</td>
<td>
<a href="C:/Users/Mayur/Desktop/html/imagemap2.html">Hello please click here
</a></td></tr>
<tr>
<td>June</td>
<td>$345</td>
</tr>
</table>
</body>
</html>
Page 9 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Output:
Click here will navigate you to table1.html
d) Table :4
Code:
<html>
<head><title>Table 4</title>
<body>
<table border=1 bgcolor="yellow" align="center">
<tr bgcolor=pink>
<th>SN</th>
<th>Item</th>
<th>Quantity</th>
</tr>
<tr>
<td > 1 </td>
<td>Apple</td>
<td>2</td>
</tr>
<tr>
<td>2</td>
<td>Mango</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>Orange</td>
<td>1</td>
</tr>
<tr>
<td colspan="2" bgcolor="lightblue" >Total</td>
<td>5</td>
</tr>
</table>
</body>
</html>
Page 10 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Output:
Page 11 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Page 12 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Page 13 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Practical – 03
3. Design a webpage that make use of Cascading Style Sheets with
a. CSS properties to change the background of a Page
Code:
<html>
<head>
<title>CSS</title>
<style>
body {
background-image:url("cat.jpg"); <!--Commented line background-repeat:no-repeat; -->
background-color: lightorange;
background-size:200px 200px;
}
</style>
<body>
<center >
<b><i><h1 style="font-size:30px; font-family:Segoe Script; ">Japanese Anime</h1></i><b>
<br>
The word anime — pronounced "ah-knee-may" — is an abbreviation of the word animation. In Japan,
the word is used to refer to all animation. However, outside of Japan, it has become the catch-all term
for animation from Japan.
</center>
</body>
</html>
Output:
Background image is by – default repeated.
Page 14 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p{
font-family: verdana;
font-size: 20px;
color: green;
}
</style>
</head>
<body>
<h1>Hello Heading 1</h1>
Unaffected area where no font is changed
<p>This is paragragh tag</p>
</body>
</html>
Output:
Page 15 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Page 16 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Practical – 04
Part A
4. Write JavaScript code for
a. Performing various mathematical operations such as calculating factorial /
finding Fibonacci Series / Displaying Prime Numbers in a given range
Page 17 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
num1=num2;
num2=num3;
}
</script>
</body>
</body>
</html>
Output:
Page 18 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Page 19 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
Output:
Starting number: 2
Ending Number: 50
Result:
Page 20 of 21
BHAVANS COLLEGE AUTONOMOUS, ANDHERI WEST
PRACTICAL JOURNAL
Class: _____________ Sem: _____ Date of Performance: ___________
Course Name:_________________________ Course Number: __________
Practical Number: _______ Page Number: _______
Aim:
</script>
</body>
</html>
Output:
Page 21 of 21