Sunteți pe pagina 1din 7

Q1) Define Web Server Mention its need

A web server is a computer system that processes requests via HTTP, the basic network
protocol used to distribute information on the World Wide Web. The term can refer to the entire
system, or specifically to the software that accepts and supervises the HTTP requests.
A web server’s main purpose is to store web site files and broadcast them over the
internet for you site visitor’s to see. In essence, a web server is simply a powerful computer that
stores and transmits data via the internet. When someone visits a web page on your site their
browser communicates with your web server, sending and receiving information that ultimately
dictates what appears on the visitor’s computer screen. Thus, the main purpose of a web server is
to store and transfer web site data upon the request of a visitor’s browser.
Apache HTTP is the most dominant web server in the world since it came in 1995,
estimated to serve around 55 per cent websites. It is preferred because
- It is available free of cost that requires no license
- Reliable and high performance
- Easy to install and use full-featured web server
- More support and faster turnaround time
- Immediate changes, no need to restart the server for new changes to be reflected.

Q4)

Code
<html>
<head>
<style>
body{
background-image:url('bg.jpeg');
background-size:cover;
}
button,img{
float: left;
}
button{
margin: 30px 0 0 30px;
}
#container{
width: 500px;
margin: auto;
}
</style>
</head>
<body>
<div id=container>
<img src=cat.jpg height=250 width=250 id="myimg">
<button onclick="fun()" id="but">Resize</button>
</div>

<script>
function fun(){
document.getElementById("myimg").height = 100;
document.getElementById("myimg").width = 100;
document.getElementById("but").style.visibility="hidden";
}
</script>
</body>
</html>

Result
Q6)
Code
Index.html

<html>
<head>
<style>
.loginpage{
width: 360px;
margin: 30px auto;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.form{
padding: 45px;
}
form input,button{
width: 100%;
height: 30px;
text-align: center;
margin: 20px 0 20px 0;
}
</style>
</head>
<body>
<div class="loginpage">
<div class="form">
<form class="login-form" action="display.html" method="GET">
<input type="text" placeholder="Name" name="Name"/>
<input type="text" placeholder="Email" name="Email"/>
<input type="text" placeholder="College" name="College"/>
<input type="text" placeholder="Department" name="Department"/>
<input type="submit" value="Submit">
</p>
</form>
</div>
</div>
</body>
</html>

Display.html

<html>
<head>
<style>
.main{
padding: 20px 40px;
width: 400px;
margin: 30px auto;
border: 1px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
#demo1{
text-align: center;
font-size: 20px;
font-weight: bold;
text-decoration: underline;
}
</style>

</head>
<body>
<div class="main">
<p id="demo1"></p>
<p id="demo2"></p>
<p id="demo3"></p>
<p id="demo4"></p>
<p id="demo5"></p>
</div>
<script>
var x = document.location.toString();
x=x.replace("+"," ");
var z=x.substring(x.indexOf("?")+1);
var y= z.split("&");
document.getElementById("demo1").innerHTML = "Details";
document.getElementById("demo2").innerHTML = y[0];
document.getElementById("demo3").innerHTML = decodeURIComponent(y[1]);
document.getElementById("demo4").innerHTML = y[2];
document.getElementById("demo5").innerHTML = y[3];
</script>
</body>
</html>

Result

Q9) a)
Code
<html>
<head></head>
<body>
<table border="1">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Points</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
</body>
</html>

Result

b)
Code
Index.html
<html>
<frameset cols="50%,50%">
<frame src="frame_a.html"></frame>
<frameset rows="400,200">
<frame src="frame_b.html"></frame>
<frameset cols="50%,50%">
<frame src="frame_c.html"></frame>
<frame src="frame_d.html"></frame>
</frameset>
</frameset>
</frameset>
</html>

frame_a.html
<html>
<body style="background-color:red">
<form method="post" style="width:400px;margin:50px auto;">
<label for="name">Name</label>
<input type="text" name="name">
<br>
<label for="email">Email</label>
<input type="text" name="email">
<br>
<input type="submit">
</form>
</body>
</html>
frame_b.html
<html>
<body bgcolor=green>
</body>
</html>

frame_c.html
<html>
<body background=bg.jpeg style="background-size:cover">
</body>
</html>

frame_d.html
<html>
<body bgcolor=purple>
<marquee behavior="scroll" direction="left" style="color:blue">This is a scrolling
message</marquee>
</body>
</html>

S-ar putea să vă placă și