Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
(AM 2011)
(AM 2011)
A web server log is a log file automatically created and maintained by a server consisting of
a list of activities it performed.
List of Contents:
Client IP address
Request date/time
Page requested
HTTP code
Bytes served
User agent
(ND2011)
Password fields are unique type of data entry fields. All information within the
password field will be displayed as an asterik(*).
Password field can be created as :
<input type="password" name="<Name of the field>" value="<Default value of the
object>">
(ND2011)
NITHYAKANI.P
UNIT-I
Page 1
(ND 2012)
Domain Name Service (DNS) is the service used to convert human readable names of hosts
to IP addresses. Protocols used: - TCP and UDP
6. Write HTML code to display an image.
(ND 2012)
(AM 2012)
(AM 2012)
<HTML> </HTML>
<BODY> </BODY>
<FORM> </FORM>
<TABLE> </TABLE>
<P>, <B>, <I>, <U> <SPAN>,
<STRONG>, <TT>, <LI>,
<OL>, <UL> <INPUT> <SELECT>
9. Write HTML code to create the following Table
w
x
y
(MJ 2013)
<html>
<table border="1" >
<tr>
<td>w</td>
<td>x</td>
</tr>
<tr>
<td>y</td>
<td>z</td>
</tr>
</html>
10. List the different basic protocol used in internet.
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
Internet Control Message Protocol (ICMP)
NITHYAKANI.P
(MJ 2013)
UNIT-I
Page 2
(MJ2014)
A Relative URL or a partial internet address, points to a resource relative to the current
directory or file.
Example : <a href="Home.html">back</a>
12. Write the functions of a web server.
(MJ2014)
A Web Server is software that accepts HTTP requests from web clients and returns an
appropriate resource in the HTTP response.
Functions of a web server:
This code provides the information about the HTTP Response from the server.
NITHYAKANI.P
UNIT-I
Page 3
Class
1.
International
Success
GET,
Redirection
Client Error
Server Error
18. What
The standard means of indicating to a browser that it should encrypt an HTTP request is to
use the https scheme on the URL for the request.
For e.g. https://www.example.org will cause the browser to attempt to send an encrypted
HTTP GET request.
19. What are HTML forms?
An HTML form is used to allow a user to input data on a web page and the element used is
form element and its main attributes are action and method.
Its format is
<form action=form.php>
</form>
20. What are the types of list supported by HTML?
There are three types of list supported by HTML.
i.
ii.
iii.
NITHYAKANI.P
UNIT-I
Page 4
16 MARKS
1.
Creates a packet which is a sequence of bits along with source and destination IP
address.
Gateway:
Route:
NITHYAKANI.P
UNIT-I
Page 5
FUNCTION OF TCP/IP
o Reliable data transmission
o Error detection using checksum
Limitations of IP:o
No guarantee of packet delivery (packets can be dropped)
o
Communication is one-way (source to destination)
IP ALONG WITH TCP:o Provides guarantee that packets delivered
o Provide two-way (full duplex) communication
(ii)
NITHYAKANI.P
UNIT-I
Page 6
The protocol does not require the server to remember anything about the client
between requests.
HTTP
Normally implemented over a TCP connection (80 is standard port number for HTTP)
Browser displays body of response in the client area of the browser window.
Can use the Internets Telnet protocol to simulate browser request and view server response.
NITHYAKANI.P
UNIT-I
Page 7
Give the structure of HTTP request and response messages. (AM 2012), (MJ 2013) (ND
2012),(ND 2012),(ND2011), (AM 2011)
(i) HTTP REQUEST MESSAGE:1. Overall Structure
Every HTTP request message has the same basic structure:
Start line
Header field(s) (one or more)
Blank line
Message body (optional)
2. HTTP Version
3. Request-URI
The Request-URI is a Uniform Resource Identifier and identifies the resource upon which
to apply the request.
TYPES of URI:-
NITHYAKANI.P
https://mail.google.com/mail/u/0/?shva=1#inbox/141707ce154b142f
UNIT-I
Page 8
4. Request Method
Each header field begins with a field name, such as Host, followed by a colon and then
a field value.
MIME TYPES
MIME TYPE
Text/plain
DESCRIPTION
Human readable text without formatting
Text/html
Image/jpeg
information
HTML document
JPEG encoded image
NITHYAKANI.P
UNIT-I
Page 9
Class
International
Success
Redirection
Client Error
Server Error
Date
Server
Last-Modified
Expires
ETag
Accept-Ranges
specifies the units that may be used by the client in a range request.
Location
4. Cache Control
NITHYAKANI.P
UNIT-I
Page 10
Most web browsers use cache to store requested resources so that subsequent requests to the
same resource will not necessarily require an HTTP request/response
Character Sets
A character set defines the mapping between these integers, or code points, and characters.
A character encoding is a bit string that must be decoded into a code-point integer that is
then mapped to a character according to the definition provided by some character set.
Content-Type header field - used in an HTTP response would indicate that the body of the
message is an HTML document.
3. Explain the capabilities of web client and web server. (12) (MJ 2013), (AM 2012)
WEB SERVER :-
NITHYAKANI.P
UNIT-I
Page 11
Every computer on the Internet that contains a Web site must have a Web server program.
Two leading Web servers:
Characteristics of a server:
Basic functionality:
o
Map Host header to specific virtual host (one of many host names sharing an IP
address).
NITHYAKANI.P
UNIT-I
Page 12
Map type of resource to appropriate MIME type and use to set Content-Type header
in HTTP response.
A web server log is a log file automatically created and maintained by a server
consisting of a list of activities it performed.
List of Contents:
Client IP address
Request date/time
Page requested
HTTP code
Bytes served
User agent
o Secure server: The standard means of indicating to a browser that it should encrypt
an HTTP request is to use the https scheme on the URL for the request.
o For e.g. https://www.example.org will cause the browser to attempt to send an
encrypted HTTP GET request.
WEB CLIENT:A Web Client is a program(web browser) that, using the client/server model and the
World Wide Webs Hypertext Transfer Protocol (HTTP), requests the web pages from the web
server.
Primary tasks:
NITHYAKANI.P
UNIT-I
Page 13
Fragment identifier not sent to server (used to scroll browser client area)
Standard features
4.
Additional functionality:
State the types of lists supported by HTML and explain them in detail. (AM 2011)
or
Explain the purpose and way of creating lists in HTML documents. (8) (ND2011)
HTML LIST
HTML offers three ways to specify the lists of information.
NITHYAKANI.P
UNIT-I
Page 14
Starting Tag
<ul>
<ol>
<dl>
<dt>
<dd>
<li>
Definition or
Description
Ending Tag
</ul>
</ol>
</dl>
</dt>
</dd>
</li>
Description
Defines an unordered list
Defines an ordered list
Defines a description list
Defines the term in a description list
Defines the description in a description list
Defines a list item
An unordered list starts with the <ul> tag and ends with </ul> tag.
Each list item starts with the <li> tag.
Description
The list items will be marked with bullets (default)
The list items will be marked with circles
The list items will be marked with squares
Symbol
The list items will be marked with bullets (small black circles).
HTML Script
<!DOCTYPE html>
<html>
<body>
<h2>Unordered List with Default bullets </h2>
<ul>
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
NITHYAKANI.P
Apples
Bananas
UNIT-I
Page 15
Lemons
Oranges
</body>
</html>
Ordered HTML Lists
An ordered list starts with the <ol> tag and ends with </ol> tag.
Each list item starts with the <li> tag.
A type attribute can be added to an ordered list, to define the type of the marker:
Type
type="1"
type="A"
type="a"
type="I"
type="i"
Description
The list items will be numbered with numbers (default)
The list items will be numbered with uppercase letters
The list items will be numbered with lowercase letters
The list items will be numbered with uppercase roman numbers
The list items will be numbered with lowercase roman numbers
Symbol
1. 2. 3.
A. B. C.
a. b. c.
I. II. III.
i. ii. iii.
Ordered List
1. Apples
2. Bananas
3. Lemons
4. Oranges
The <dt> tag defines the term (name), and the <dd> tag defines the data (description).
HTML Script
<!DOCTYPE html>
<html>
NITHYAKANI.P
UNIT-I
Page 16
5.
<body>
<h2>A Description List</h2>
A Description List
<dl>
<dt>Coffee</dt>
Coffee
<dd> - black hot drink
- black hot drink
</dd>
Milk
<dt>Milk</dt>
- white cold drink
<dd> - white cold drink <dd>
</dl>
</body> </html>
Explain how tables can be inserted into a HTML document with an example.
TABLES:The HTML tables allow users to arrange data into rows and columns of cells.
The HTML tables are created using the <table> tag in which the <tr> tag is used to create table
rows and <td> tag is used to create data cells.
Table elements
Starting Tag
Ending Tag
Description
table
<table>
</table>
defines a table
caption
<caption>
</caption>
tr
<tr>
</tr>
th
<th>
</th>
Td
<td>
</td>
!DOCTYPE HTML>
<html>
<head>
<title>Campus Recruitment Program 2014-2015 </title>
</head>
<body>
<table border="1">
<caption><h3><b> Eligibility criteria for Students <b> </h3>
</caption>
<tr> <th> Degree </th>
<th>Percentage / CGPA</th>
</tr>
<tr> <td>X</td>
<td>60%</td>
</tr>
NITHYAKANI.P
UNIT-I
Page 17
Table Attributes:
Table Attributes
Format
Eg.
Border
border=value
border=1
cellpadding=value
cellpadding=2
cellspacing=value
cellspacing=2
rowspan=value
rowspan=3
colspan=value
colspan=3
FORMS:
A form will take input from the user and then will post it to a back-end application such as CGI,
elements
Form
Input
Select
Option
NITHYAKANI.P
Starting Tag
<form>
< input >
<select>
<option>
Ending Tag
</form>
</select>
</option>
Description
defines the form
Get the input from the user
Defines the drop down list
Defines the option to select
UNIT-I
Page 18
INPUT TAG
Type
Description
ATTRIBUTES
Text
type=text
Radio
type=radio"
Submit
type=submit
Password
Checkbox
<!DOCTYPE HTML>
<html>
<head><title>REG FORM</title></head>
<body>
<h4>Student Info</h4>
<FORM>
Student Name:<input type="text"
width="20"><br>
Batch:<select>
<option type="" value="2012 to 2016">
2012 2016 </option>
<option type="" value="2011 to 2015">
2011 2015 </option>
</select><br>
<br>
<br>
CGPA:<select>
<option type="" value="10"> 10 </option>
<option type="" value="9"> 9 </option>
<option type="" value="8"> 8 </option>
<option type="" value="7"> 7 </option>
<option type="" value="6"> 6 </option>
</select>
</form></body>
</html>
NITHYAKANI.P
UNIT-I
Page 19
6.
NITHYAKANI.P
UNIT-I
Page 20
7.
How do you create frames? Why do we need them? Develop an application to explain the same.
FRAMES
Frames is used to display more than one HTML document in the same browser window.
Each HTML document is called a frame, and each frame is independent of the others.
Elements of Frames:
1. The Frameset Tag
The <frameset> tag defines how to divide the window into frames.
Each frameset defines a set of rows or columns.
The values of the rows/columns indicate the amount of screen area each
NITHYAKANI.P
UNIT-I
Page 21
NITHYAKANI.P
UNIT-I
Page 22
NITHYAKANI.P
UNIT-I
Page 23