Beruflich Dokumente
Kultur Dokumente
WEB PROGRAMMING
Declaration:
I declare that this assignment is my individual work. I have not copied from any other
student’s work or from any other source except where due acknowledgment is made
explicitly in the text, nor has any part been written for me by another person.
Evaluator’s comments:
_____________________________________________________________________
Part-A
Q.1 Write the code to create thumbnails and steps to create thumbnails using
appropriate Example.
<Html>
<Head>
<Title> thumbnail</title></head>
<bgcolor="red">
<a href="i1.html" target=" ">
<img src="i1.jpg" alt="" width="60" height="60"></a>
<a href="i2.html" target=" ">
<img src="i2.jpg" alt="" width="60" height="60"></a>
<html>
<head>
<title> thumbnail</title></head>
<img src="image5.jpg" border="1" width="900" height="500">
</html>
Output:
Steps:
1. First save the picture as a JPEG file.
2. Access the HTML source code for the page you want to add a
thumbnail to.
3. Type in the following HTML code, replacing the words
"pictureURL" with the exact URL of the picture you are using:
<a href="image1.html" target=" ">
<img src="image1.jpg" alt="" width="60" height="60"></a>
4. Save the page and view it to see your new thumbnail image and
associated full-sized picture link. The thumbnail will be 60 pixels
by 60 pixels using the code in Step 4; if you want a different-sized
thumbnail, simply fill in different values under the width and
height sections of the code.
Lists
-----------------------------
-----------------------------
------------------------------
1. -----------------------
2. -----------------------
3. -----------------------
I……………………….
II………………………
III………………………
a)……………………………..
b)…………………………….
Answer:
<html>
<body>
<h1 >Lists</h1>
<ul>
<li>------------</li>
<li>-------------</li>
<li>-------------</li>
<ol type = "1">
<li>----------</li>
<li>----------</li>
<li>----------</li>
<ol type = "I">
<li>...........</li>
<li>...........</li>
<li>...........</li>
<ol type = "a">
<li>...........</li>
<li>...........</li>
<li>...........</li>
</ol>
</ol>
</ol>
</ul>
</body>
</html>
Q.3 Write HTML code for following layout using frames. The underlined words act as hyperlink and
correspond to each hyperlink the appropriate page should be open.
Courses Courses
Schools
Dept
Blocks
Answer:
Frame coding:
<html>
<head>
<title>webpage</title></head>
<frameset rows="20%,*">
<frame src="LPU.html">
<frameset cols="20%,*,*">
<frame src="link.html">
<frame name="frame">
</frameset>
</frameset>
</HTML>
Output:
Linking coding.
<html>
<head>
<title>webpage</title></head>
<body>
<a href="blocks.html"target="frame">Blocks</a>
</body>
</html>
Courses coding:
<html>
<head>
<title>webpage</title></head>
<body bgcolor="yellow">
<p><font color="red"><h1>Courses</h1></p></font>
Hotel Management,<br>
Computer Application,<br>
Engineering,<br>
Architecture, <br>
Design, <br>
Commerce, <br>
Fashion Technology,<br>
Pharmacy, <br>
Physiotherapy, <br>
Biotechnology,<br>
Microbiology,<br>
Biochemistry, <br>
Education, <br>
Physical Education,<br>
Films, Animation, Fine Arts, Performing Arts, Sciences, Arts & Languages
etc.
</body>
</html>
Out put:
Schools coding:
<html>
<head>
<title>webpage</title></head>
<body bgcolor="yellow">
<p><font color="red"><h1>Schools<h1></p></font>
</html>
Output:
Dept coding
<html>
<head>
<title>webpage</title></head>
<body bgcolor="yellow">
<p><font color="red">Dept</p></font>
</body>
</html>
Blocks coding:
<html>
<head>
<title>webpage</title></head>
<body bgcolor="yellow">
<p><font color="red"><h1>Blocks</h1></p></font>
<h2>BH Block-1</h2>
<h2>BH Block-2</h2>
<h2>BH Block-3</h2>
</body>
</html>
Part-B
Q.4 Write code for a Web page which uses CSS to display relevant data.
Answer: </html>
body{background-color: red;}
P {font-family:” Arial";
font-size:30px;
</style>
</head>
<body>
System software helps use the operating system and computer system.
It includes diagnostic tools, compilers, servers, windowing systems,
utilities, language translator, data communication programs, database
systems and more.
</p>
</body>
</html>
Output:
Q.5. Write code for a Web page which uses JavaScript to perform
various validations on the registration form for an organization.
<html>
<head>
<title>Login</title>
<script type="text/javascript">
function validate(form){
var userName = form.Username.value;
var password = form.Password.value;
if (userName.length ===0) {
alert("You must enter a username.");
return false;
}
if (password.length == 0) {
alert("You must enter a password.");
return false;
}
return true;
}
</script>
</head>
<body>
<h1>Login Form</h1>
<form method="post" action="registration.html"
onsubmit="return validate(this);">
Q.6 Create a HTML form that calculates electricity bill, maybe user ought
to have the option of online payment. Use JavaScript to perform
relevant validations for a given below.
<html>
<head>
<body>
<form name="Electricityform">
<pre>
</pre>
</form>
</body>
</html>