Web Programming 21CSL481- AEC- Lab Manual
Web Programming 21CSL481- AEC- Lab Manual
LABORATORY MANUAL
Web Programming Lab [ 21CSL481]
21CSL481
Compiled by
Mrs. Ragini Krishna,
Asst. Professor
USN:
Branch/Semester:
Academic Year:
Sri Raghavendra Educational Institutions Society(R)
GENERAL INSTRUCTIONS
The resource has been established as per requirement on need basis. In order to utilize the
resource effectively and efficiently we need to follow few guidelines.
Do’s
Students must leave your foot footwear
wear outside the lab at designated place.
Students must keep your belongings in the designated place.
Students must maintain discipline & follow ethics in the lab.
Students must indicate the Login & Logout time on the record.
Students must come prepare wit
with Observation / Data sheet.
Students must enter the lab and login to the allotted computer.
Students must use the computer lab for Academic related activities.
Students must use the computer lab for Academic related activities.
Students must keep their wor
working area orderly & neatly.
Students must turn off the computer and keep the chairs properly before leaving the
lab.
Don’ts
Students must not eat food, chew gum in the lab.
Students must not change the existing setup in the lab.
Students must not disrupt, or trouble other students in the lab.
Students must not interfere or tamper anyone else’s work.
Students must not access any computer or data without permission.
Students must not connect the external storage to avoid transfer of virus.
Sri Raghavendra Educational Institutions Society(R)
WEB PROGRAMMING
(Practical based)
Course Code 21CSL481 CIE Marks 50
Teaching Hours/Week (L:T:P: S) 0:1:1:0 SEE Marks 50
Total Hours of Pedagogy 12T + 12P Total Marks 100
Credits 01 Exam Hours 02
Course Objectives:
CLO 1. Learn Web tool box and history of web browsers.CLO
2. Learn HTML, XHTML tags with utilizations.
CLO 3. Know CSS with dynamic document utilizations.
CLO 4. Learn JavaScript with Element access in JavaScript.
CLO 5. Logically plan and develop web pages..
Teaching-Learning Process (General Instructions)
These are sample Strategies, which teachers can use to accelerate the attainment of the various course outcomes.
1. Lecturer method (L) need not to be only a traditional lecture method, but alternative effective
teaching methods could be adopted to attain the outcomes.
2. Use of Video/Animation to explain functioning of various concepts.
3. Encourage collaborative (Group Learning) Learning in the class.
4. Ask at least three HOT (Higher order Thinking) questions in the class, which promotes critical
thinking.
5. Adopt Problem Based Learning (PBL), which fosters students’ Analytical skills, develop design
thinking skills such as the ability to design, evaluate, generalize, and analyze information ratherthan
simply recall it.
6. Introduce Topics in manifold representations.
7. Show the different ways to solve the same problem with different circuits/logic and encouragethe
students to come up with their own creative ways to solve them.
8. Discuss how every concept can be applied to the real world - and when that's possible, it helps
improve the students' understanding.
Module-1
Introduction to WEB Programming: Internet, WWW, Web Browsers, and Web Servers, URLs, MIME,
HTTP, Security, The Web Programmers Toolbox.
CSS: Introduction, Levels of style sheets, Style specification formats, Selector forms, Property value forms, Font
properties, List properties, Color, Alignment of text, Background images, tags.
Textbooks
1. Robert W Sebesta, “Programming the World Wide Web”, 6th Edition, Pearson Education, 2008.
Reference Books
1. M.Deitel, P.J.Deitel, A.B.Goldberg, “Internet & World Wide Web How to program”, 3rd
Edition, Pearson Education / PHI, 2004.
2. Chris Bates, “Web Programming Building Internet Applications”, 3rd Edition, Wiley India, 2006.
3. Xue Bai et al, “The Web Warrior Guide to Web Programming”, Thomson, 2003.
4. Sklar, “The Web Warrior Guide to Web Design Technologies”, 1st Edition, Cengage Learning
India
Tutorial Link:
1. http://www.tutorialspoint.com
2. http://www.w3schools.com
LIST OF EXPERIMENTS
SL. Experiments
NO.
1. Create a page using html tags to accomplish the following:
i. A paragraph containing text “All that glitters is not gold”. Bold face and italicize
this text
ii. Put a background image to a page and demonstrate all attributes of background
image
iii. Create unordered list of 5 fruits and ordered list of 3 flowers
iv. Create a equation: X=1/3(y12+z12)
v. Demonstrate different heading tags
3. Create following table using XHTML tags. Properly align cells, give suitable cell
padding and cell spacing, and apply background color, bold and emphasis necessary.
4. Demonstrate the following HTML5 Semantic tags tags-<article>,
article>, <aside>, <details>,
<figcaption>, <figure>, <footer>, <header>, <main>, <mark>, <section> for a
webpage that gives information about travel experience.
5. Create a class called income, and make it a background color of #0ff.
Create a class called expenses, and make it a background color of #f0f.
Create a class called profit, and make it a background color of #f00.
Throughout the document, any text that mentions income, expenses, or profit, attach the
appropriate class to that piece of text. Further create following line of text in the same
document: The current price is 5050₹and new price is 40₹
Sri Raghavendra Educational Institutions Society(R)
8. Write a JavaScript that calculates the squares and cubes of the numbers from 0 to 10 and outputs
HTML text that displays the resulting values in an HTML table format.
9. Write a Java Script program that on clicking a button, displays scrolling text which moves from
left to right with a small delay.
ay.
10. Create a webpage containing 3 overlapping images using HTML, CSS and JS.
Further when the mouse is over any image, it should be on the top and fully
displayed.
Sri Raghavendra Educational Institutions Society(R)
Department
epartment of Information Science and
Engineering
Vision
Mission
M1. To produce technically competent graduates thr
through
ough a balanced
curriculum and interdisciplinary applications.
M2. To create a competitive ambience for gr grooming
ooming young minds to meet
the industry trends and become self sustainable.
M3. To create knowledge of innovative technologi
technologies
es through research
and higher studies within the core areas of computation.
Sri Raghavendra Educational Institutions Society(R)
Mission
ission of the Institute
PEO3: Learn to apply modern skills, techniques, and engineering tools to create
computational systems.
2. Problem analysis: Identify, formulate, review research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences, and
engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and design
system components or processes that meet the specified needs with appropriate consideration for the
public health and safety, and the cultural, societal, and environmental considerations.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities with an
understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal,
health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice
7. Environment and sustainability: Understand the impact of the professional engineering solutions in
societal and environmental contexts, and demonstrate the knowledge of, and need for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of
the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader in diverse
teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the engineering
community and with society at large, such as, being able to comprehend and write effective reports and
design documentation, make effective presen
presentations,
tations, and give and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the engineering
and management principles and apply these to one’s own work, as a member and leader in a team, to
manage projects ts and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long
long learning in the broadest context of technological change.
Sri Raghavendra Educational Institutions Society(R)
Program :
<html>
<head>
<title>Program 1a</title>
<style>
body{
background-image: url('skit.jpg');
background-size: 300px 100px;
background-repeat: repeat-x;
/*
background-repeat: repeat-x;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;*/
}
</style>
</head>
<body>
<p><b><i>All that glitters is not gold</i></b>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type
and scrambled it to make a type specimen book. It has survived not on only
ly five centuries, but also the leap
into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the
release fLetraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus
dus PageMaker <b><i>All that glitters is not gold</i></b>including versions of Lorem
Ipsum.</p>
<p>
It is a long established fact that a reader will be distracted by the readable content <b><i>All that
glitters is not gold</i></b> of a page when looking at its layout. The point of using Lorem Ipsum is that
it has a more-or-less
less normal distribution of letters <b><i>All that glitters is not gold</i></b></p>
gold</i></b>
Sri Raghavendra Educational Institutions Society(R)
<h1>Unordered list</h1>
<h2>Fruits</h2>
<ul>
<li>Apple</li>
<li>Mango</li>
<li>Pineapple</li>
<li>Watermelon</li>
<li>Orange</li>
</ul>
<h1>Ordered list </h1>
<h2>Flowers</h2>
<ol type="i">
<li>Rose</li>
<li>Lotus</li>
<li>Sun flower</li>
</ol>
Program :
<html>
<head>
<title> Program 1b</title>
<style>
.container{
background-color:
color: pink;
width:25%;
padding:25px;
}
button {
background-color:
color: orange;
width: 40%;
color: white;
padding: 15px;
margin: 10px 0px;
border: none;
cursor: pointer;
}
input[type=text], input[type=password] {
width: 90%;
margin: 8px 0;
padding: 12px 20px;
}
Sri Raghavendra Educational Institutions Society(R)
button:hover {
opacity: 0.2;
}
</style>
</head>
<body>
<form>
<div class="container">
<center><h2> Sign up today </h2></center>
<label>Name : </label></br>
<input type="text"></br>
<label>E-mail
mail : </label></br>
<input type="text"></br>
<label>Password : </label></br>
/label></br>
<input type="password"></br>
<label>Confirm password : </label></br>
<input type="password"></br>
<button type="submit">Register</button>
</div>
</form>
</body>
</html>
3. Create following table using XHTML tags. Properly align cells, give suitable cell padding
and cell spacing, and apply background color, bold and emphasis necessary.
Program :
<?xml version="1.0" encoding="UTF
encoding="UTF-8"?>
<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/ xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
s="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Table Demo XHTML PAGE</title>
<meta name="author" content="Ragini" />
<meta name="date" content="2023
content="2023-02-17T04:58:37+0530" />
<meta http-equiv="content
equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="content
equiv="content-type"
type" content="application/xhtml+xml; charset=UTF-8"/>
charset=UTF
<meta http-equiv="content
equiv="content-style-type" content="text/css"/>
<meta http-equiv="expires"
equiv="expires" content="0"/>
Sri Raghavendra Educational Institutions Society(R)
<style>
table, th, td {
border: 1px solid black;
border-collapse:
collapse: collapse;
}
th, td{
padding-left: 10px;
padding-bottom: 20px
}
table {
border-spacing: 30px;
}
</style>
</head>
<body>
<h3>Tables
h3>Tables in XHTML</h3>
<td ><em>SubjectE</em></td>
</tr>
<tr>
<td ><em>SubjectF</em></td>
</tr>
<tr>
<td ><em>SubjectG</em></td>
</tr>
<tr>
<td rowspan="3" align="center" bgcolor=9E7BA0>
<b>Sem3</b>
</td>
<td ><em>SubjectH</em></td>
</tr>
<tr>
<td ><em>SubjectI</em></td>
</tr>
<tr>
<td ><em>SubjectJ</em></td>
</tr>
</table>
</body>
</html>
Output:
Sri Raghavendra Educational Institutions Society(R)
Program:
<!--Demonstrate
Demonstrate the following HTML5 Semantic tags tags- <article> , <aside> , <details> ,
< figcaption >, < figure >, < footer >, < header >, < main >, < mark >, < section >
for a webpage that gives information about travel experience.> -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML5 Semantic Tags Demo</title>
<style>
body{
background-color:
color: #FFFDD0;
}
aside {
float: right;
width: 25%;
background-color:
color: cyan;
font-style: italic;
padding: 15px;
}
main {
float: left;
width: 70%;
}
footer {
position: fixed;
right: 1000;
bottom: 0;
width: 100%;
text-align: center;
}
mark {
background-color:
color: yellow;
color: black;
}
Sri Raghavendra Educational Institutions Society(R)
figure {
display: inline-block;
margin: auto;
}
figcaption {
font-style: italic;
}
.slider {
width: 500px;
height: 300px;
background-color:
color: yellow;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
text-align: center;
overflow: hidden;
}
.image-container {
width: 1500px;
background-color: pink;
height: 300px;
clear: both;
position: relative;
-webkit-transition:
transition: left 2s;
-moz-transition: left 2s;
-o-transition: left 2s;
transition: left 2s;
}
.slide {
float: left;
margin: 0px;
padding: 0px;
position: relative;
}
#slide-1:target ~ .image-container
container {
left: 0px;
}
#slide-2:target ~ .image-container
container {
left: -500px;
}
Sri Raghavendra Educational Institutions Society(R)
#slide-3:target ~ .image-container
container {
left: -1000px;
}
.buttons {
position: relative;
top: -20px;
}
.buttons a {
display: inline-block;
height: 15px;
width: 15px;
border-radius: 50px;
background-color: lightgreen;
tgreen;
}
</style>
</head>
<body>
<article>
<header>
<h1>My Travelogue</h1>
<p>Random Escapades</p>
</header>
<main>
<figure>
<!--<img
<img src="ooty_road.jpg" alt="Example Image" width="350" height="235"> -->
<div class="slider">
<span id="slide-1"></span>
1"></span>
<span id="slide-2"></span>
2"></span>
<span id="slide-3"></span>
3"></span>
<div class="image-container">
container">
<img src="ooty_road.jpg" class="slide" width="500" height="300" />
<img src="malay_chayos.jpg" class="sli
class="slide"
de" width="500" height="300" />
<img src="Gokarna_1.jpg" class="slide" width="500" height="300" />
</div>
<div class="buttons">
<a href="#slide-1"></a>
<a href="#slide-2"></a>
<a href="#slide-3"></a>
</div>
</div>
Sri Raghavendra Educational Institutions Society(R)
<section>
<h2>Mysore</h2>
<p> The city is also known as the City of Palaces, Mysuru has always enchanted itsvisitors with
its quaint charm.</p>
</section>
</main>
<aside>
<section>
<p>Upcoming Trek planned to <mark>
<mark>Kumara
Kumara Parvata</mark> will be sharing detils soon</p>
<details>
<summary>Tentative Dates</summary>
<p>24th August 2023</p>
</details>
</section>
</aside>
<footer>
<p>© 2023 Ragini Krishna</p>
</footer>
</article>
</body>
</html>
Output:
Sri Raghavendra Educational Institutions Society(R)
Program:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Class Selectors Demo</title>
<style>
.income {background-color:
color: #0ff; font
font-style: italic;}
.expenses {background-color:
color: #f0f;font
#f0f;font-style: oblique;}
.profit {background-color:
color: #ff0;font
#ff0;font-weight: bold;}
.red{color: red;font-size:
size: 24px;}
.strike{text-decoration: line-through;
through; font
font-size: 24px;}
p {font-family: Cursive;}
</style>
</head>
<body>
<h1>Class Selectors Demo</h1>
<p>
Income, expenses, and profit are financial terms that are used to measure the financial health of
a person or a business.
</p>
<p class="income">
Income refers to the amount of money received by an individual or business fromvarious
sources such as employment,
loyment, investments, or sales of goods and services.Income can be earned
on a regular basis, such as a salary, or irregularly, suchas a bonus or one
one-time
time payment.
</p>
<p class="expenses">
Expenses, on the other hand, refer to the amount of money spenspentt by an individual orbusiness to
cover their costs of living or operating. Expenses can include fixed costs such as rent or salaries,
variable costs such as the cost of materials, or discretionary costs such as entertainment or travel.
</p>
Sri Raghavendra Educational Institutions Society(R)
<p class="profit">
Profit is the amount of money that remains after deducting expenses from income. Itrepresents
the financial gain or loss that a person or business has generated over a given period of time.
</p>
</body>
</html>
Sri Raghavendra Educational Institutions Society(R)
Program:
student.xml
<?xml version="1.0" encoding="UTF
encoding="UTF-8"?>
<?xml-stylesheet
stylesheet type="text/css" href="student.css"?>
<student_information>
<head1>Student Information</head1>
<head2>First Student Information</head2>
<ad><label>USN:</label><usn>1KT21IS001</usn></ad>
<ad><label>NAME:</label><name>Advi</name></ad>
<ad><label>COLLEGE:</label><college>SKIT</college></ad>
bel>COLLEGE:</label><college>SKIT</college></ad>
<ad><label>BRANCH:</label><branch>ISE</branch></ad>
<ad><label>YEAR:</label><year>2021</year></ad>
<ad><label>EMAIL:</label><email>[email protected]</email></ad>
</student_information>
Sri Raghavendra Educational Institutions Society(R)
student.css
head1
{
font-size:16pt;color:blue;
size:16pt;color:blue;
}
head2{display:block;font-size:16pt;color:green;text
size:16pt;color:green;text-decoration:underline}
ad{display:block;}
label{font-weight:bold;color:blue;}
weight:bold;color:blue;}
usn{font-size:14pt;color:red;}
name{font-size:14pt;color:red;}
size:14pt;color:red;}
college{font-size:14pt;color:red;}
size:14pt;color:red;}
branch{font-size:14pt;color:red;}
size:14pt;color:red;}
year{font-size:14pt;color:red;}
size:14pt;color:red;}
email{font-size:14pt;color:red;}
size:14pt;color:red;}
Output:
Sri Raghavendra Educational Institutions Society(R)
.box{
background-color:
color: #FF00FF;
border : 1px solid black;
height: 300px;
width: 270px;
border-radius: 10px;
position: relative;
top: 80px;
left: 40%;
}
.display input{
position: relative;
left: 9px;
top: 10px;
height: 35px;
border-radius: 10px;
color: black;
background-color: white;
font-size: 21px;
text-align: right;
}
.keys
{
position: relative;
top: 15px;
}
.button{
width: 40px;
height: 30px;
border: none;
border-radius: 8px;
margin-left: 17px;
cursor: pointer;
border-top:
top: 2px solid transparent;
}
Sri Raghavendra Educational Institutions Society(R)
.title:hover {
color: #fff;
}
.title {
margin-bottom: 10px;
margin-top: 30px;
padding: 5px 0;
font-size: 100px;
font-weight: bold;
text-align: center;
color: gray;
font-family:
family: 'Cookie', cursive;
}
.button.gray {
color: #000000;
background-color:
color: #999999;
border-bottom:
bottom: gray 2px solid;
border-top:
top: 2px 303030 solid;
font-weight: bold;
}
.gray:active {
border-top: gray 2px solid;
border-bottom:
bottom: #303030 2px ssolid;
}
p{
line-height: 10px;
}
</style>
</head>
<body>
<div class = "title? align="centre">
Calculator using HTML
</div>
Sri Raghavendra Educational Institutions Society(R)
<div class="box">
<div class="display">
<input type="text" readonly size="18" id="d">
</div>
<div class="keys">
<p>
<input
input type="button" class="button gray" value="(" onclick='v("(")'>
<input type="button" class="button gray" value=")" onclick='v(")")'>
<input type="button" class="button gray" value="C" onclick='c("")'>
<input ty
type="button"
pe="button" class="button gray" value="%" onclick='v("%")'>
</p>
<p>
<input type="button" class="button gray" value="7" onclick='v("7")'>
<input type="button" class="button gray" value="8" onclick='v("8")'>
<input type="button" class="button gray" value="9" onclick='v("9")'>
<input type="button" class="button gray" value="*" onclick='v("*")'>
</p>
<p>
<input type="button" class="button gray" value="4" onc
onclick='v("4")'>
lick='v("4")'>
<input type="button" class="button gray" value="5" onclick='v("5")'>
<input type="button" class="button gray" value="6" onclick='v("6")'>
<input type="button" class="button gray" value="
value="-"" onclick='v("-")'>
onclick='v("
</p>
<p>
<input type="button" class="button gray" value="1" onclick='v("1")'>
<input type="button" class="button gray" value="2" onclick='v("2")'>
<input type="button" class="button gray" value="3" onclick='v("3")'>
<input type="button" class="button gray" value="+" onclick='v("+")'>
</p>
<p>
<input type="button" class="button gray" value="0" onclick='v("0")'>
<input type="button" class="button gray" value="." onclick='v(".")'>
<input type="button" class="button gray" value="/" onclick='v("/")'>
<input type="button" class="button gray" value="=" onclick='e()'>
</p>
</div>
</div>
</body>
Sri Raghavendra Educational Institutions Society(R)
<script>
function c(val)
{
document.getElementById("d").value=val;
}
function v(val)
{document.getElementById("d").value+=val;
}
function e()
{
try
{
c(eval(document.getElementById("d").value))
}
catch(e)
{
c('Error') }
}
</script>
</html>
Output:
Sri Raghavendra Educational Institutions Society(R)
8. Write a JavaScript that calculates the squares and cubes of the numbers from 0 to 10 and
outputs HTML text that displays the resulting values in an HTML table format.
<html>
<head>
<title>Square-Cube</title>
<style>
table{
width:300px;
text-align:center;
border:2px solid #000;
background-color:#c8c8c8;
margin:0 auto;
}
td{
height:35px;
}
.wrapper{
text-align:center;
}
</style>
</head>
<body>
<div class="wrapper">
<h2>Squares and Cubes of the numbers from 0 to 10</h2>
<script>
document.write("<table>");
document.write( "<tr><th>Number</th><th>Square</th><th>Cube</th></tr>" ) ;
for(var n=0; n<=10; n++)
{
document.write( "<tr><td>" + n + "</td><td>" + n*n + "</td><td>" + n*n*n + "</td></tr>" ) ;
}
document.write( "</table>" ) ;
</script>
</div>
</body>
</html>
Sri Raghavendra Educational Institutions Society(R)
Output:
Sri Raghavendra Educational Institutions Society(R)
9. Write a Java Script program that on clicking a button, displays scrolling text which moves from
left to right with a small delay.
HTML Code:
<!DOCTYPE html>
<html>
<head>
<title>Scrolling Text Example<
Example</title>
<style>
#scrollingText {
font-size:
size: 24px; font
font-weight: bold;
white-space:
space: nowrap; overflow: hidden;
}
</style>
</head>
<body>
<button id="startBtn">Start Scrolling</button>
<div id="scrollingText">This is some scrolling text!</div>
<script>
var scrollingText = document.getElementById("scrollingText");
var startBtn = document.getElementById("startBtn");
var textWidth = scrollingText.clientWidth;
var containerWidth = scrollingText.parentNode.clientWidth;
var currentPosition = 0;
function
unction scrollText() {
if (currentPosition < containerWidth) {
scrollingText.style.transform = "translateX(
"translateX(-"" + currentPosition + "px)";
currentPosition += 1;
setTimeout(scrollText, 20);
} else {
currentPosition = -textWidth;
textWidth;
scrollText();
}
}
startBtn.addEventListener("click",
artBtn.addEventListener("click", function() {
currentPosition = 0;
scrollText();
});
</script>
</body>
</html>
Sri Raghavendra Educational Institutions Society(R)
Output:
Sri Raghavendra Educational Institutions Society(R)
10. Create a webpage containing 3 overlapping images using HTML, CSS and JS. Further when the
mouse is over any image, it should be on the top and fully displayed.
HTML CODE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="author" content="Ragini" >
<title>Animal Stacking</title>
<style>
h1 {text-align:
align: center;}
.yana{
position: absolute;
left: 10%; top: 10%;
z-index: 0;
}
.malay{
position: absolute;
left: 30%; top: 30%;
z-index: 1;
}
.gokarna {
position: absolute;
left: 50%; top: 50%;
z-index: 2;
}
</style>
<script>
var topIndex = 2;
function moveToTop(picture) {
picture.style.zIndex = ++topIndex;
}
</script>
</head>
Sri Raghavendra Educational Institutions Society(R)
<body>
<h1>Image Overlap Demo</h1>
<div id="image-container">
container">
<img id="yana" class="yana" src="Yana.jpg" onmouseover="moveToTop(this)"
width="400" height="300">
<img id="malay" class="malay" src="Malay_room.jpg"
onmouseover="moveToTop(this)" width="400" height="300">
<img id="gokarna" class="gokarna" src="Gokarna_1.jpg"
onmouseover="moveToTop(this)"width="400" height="300">
</div>
</body>
</html>
Output:
Sri Raghavendra Educational Institutions Society(R)
VIVA
css
Sheets?
specified
documents
same
can
style
Gathering
selectors
more
the
4.
There
set
5.
The
property?
floating
other
allowed.
using
2.
3.
WEB
rules)
rendering
elements.
for
multiple
document,
A
separated
share
semicolon
declarations
Property
(attribute)
through
corresponding
which
6.What
1.
(CSS)
group
Conducting
Interactive
What
Gathering
to
asame
:-be
clear
single
element
the
each
HTML
TECHNOLOGY
that
must
sides
Questions
attached.
isare
CSS,
elements
is
are
of
elements,
is
that
selector.
same
aproperty
list
Style
properties
that
into
can
class?
grouping?
property?
the
separated
or
property.
list
at
athe
instances
element
always
Cascading
of
that
user
stylistic
forms?
two
services
even
once.
e.g.
to
CSS
assign
Surveys
value
can
an
of
anecessities
style
rules
comma
which
are
::-
statements
information
are
element
or
font
and
be
specifies
multiple
be
clear
occurrence,
or
attached
to
more
or
list
can
of
not
various
parameter
influenced
aor
Style
entire
HTML
into
avalues
Lab
the
two
unique
be
width.
where
ofa(or
or
to
WEB PROGRAMMING LAB VIVA QUESTIONS WITH ANSWERS
1) What is HTML?
HTML stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a
standard text formatting language which is used to create and display pages on the Web. It makes
the text more interactive and dynamic. It can turn text into images, tables, links.
HTML tags are composed of three things: an opening tag, content and ending tag. Some tags are
unclosed tags.
2.5HTML
HTML documents contain two things:
o content, and
o tags
When a web browser reads an HTML document, the browser reads it from top to bottom and left
to right. HTML tags are used to create HTML documents and render their properties. Each HTML
tags have different properties
7) Which HTML tag is used to display the data in the tabular form?
The HTML table tag is used to display data in tabular form (row * column). It also manages the
layout of the page, e.g., header section, navigati
navigation
on bar, body content, footer section. Here is the
list of tags used while displaying the data in the tabular form:
Tag Description
<col> It is used with <colgroup> element to specify column properties for each column.
8) What are some common lists that are used when designing a page?
There are many common lists which are used to design a page. You can choose any or a
combination of the following list types:
o Ordered list - The ordered list displays elements in num
numbered
bered format. It is represented by
<ol> tag.
o Unordered list - The unordered list displays elements in bulleted format. It is represented
by <ul> tag.
o Definition list - The definition list displays elements in definition form like in dictionary.
The <dl>, <dt>
dt> and <dd> tags are used to define description list.
HTML elements communicate to the browser to render text. When the elements are enclosed by
brackets <>, they form HTML tags. Most of the time, tags come in a pair and surround content.
<!DOCTYPE html>
<html>
<body>
<h2>HTML Iframes example
example</h2>
<p>Use the height and width attributes to specify the size of the iframe:</p>
iframe:
<iframe src="https://www.javatpoint.com/"
"https://www.javatpoint.com/" height="300" width="400"
"400"></iframe>
</body>
</html>
Sri Raghavendra Educational Institutions Society(R)
Marquee
rquee is used to put the scrolling text on a web page. It scrolls the image or text up, down, left
or right automatically. You should put the text which you want to scroll within the
<marquee>......</marquee> tag.
To make a picture a background image on a web page, you should put the following tag code after
the </head> tag.
<p>
<span style="color:#ffffff;"
"color:#ffffff;">
In this page we use span.
</span>
</p>