DEPARTMENT OF INFORMATION TECHNOLOGY
IT2353 –WEB TECHNOLOGY
Two Marks with Answers
SUBJECT CODE : IT2353
SUBJECT NAME:WEB TECHNOLOGY
Year / Class : 111rd yr IT
Semester : 6th sem
UNIT - I
PART – A
Two Marks with Answers
1. DEFINE INTERNET .
Network is an interconnection of systems to share data and information.
Internet is network of network or collection of heterogeneous networks.
2. WHAT IS THE USE OF IP ADDRESSES AND PORTS?
It is very difficult to remember the IP address of each and every node.
It order to avoid this problem domain names are used.
Example googl.com, rediff.com etc.
Ports are used in receiving and sending data to another server or client.
Example for port numbers
Protocol Port Protocol Purpose
Echo 7 TCP/UDP Echo is a test protocol used to verify that 2 machines
1. are able to connect by having one echo back the Application Layer Transport Layer (TCP, UDP) Internet layer (IP) Physical path(Ethernet, FDDI etc) other’s input.
Discard 9 TCP/UDP Discard is a less useful test protocol in which all data
2. received by the server is ignored.
NTP 119 Usenet News transfer is more formally known as the
Network News Transfer Protocol
RMI Registry 1099 This is the registry service for Java Remote Objects.
3. MENTION THE DIFFERENT INTERNET ADDRESS CLASS AND IT’S RANGE.
Internet addresses are assigned to different organizations by the Internet Assigned Numbers Authority (IANA).
ISP – Internet Service Providers gives a block addresses.
Class C address block specifies the first 3 bytes of address, for example 199.1.32. This allows room for 254 individual addresses from 188.8.131.52 to 184.108.40.206
Class B address specified only the first 2 bytes of the addresses .
There are also Class D and E addresses are used for IP multicast group.
4. DEFINE FIREWALL.
The hardware and software that sits between the Internet and the local network, checking all the data that comes and goes out is called “firewalls”. The security is provided using SSL(Secure Socket Layer) in internet.
5. DEFINE PROXY SERVERS
Proxy servers are related to firewalls prevents hosts on a network from making direct connections to the outside world, a proxy server can act as a go-between. Thus a machine that is prevented from connecting to the external network by a firewall would make a request for a web page from the local proxy server instead of requesting the web page directly from the remote web server.
6. WHAT IS THE USE OF HTTP PROTOCOL?
HTTP is a standard protocol that defines how a web client talks to a server and how data is transferred from the server back to the client.
HTTP relies heavily on two other standards.
MIME (Multipurpose Internet Mail Extensions), HTML
7. WHAT IS THE USE OF MIME?(Multipurpose Internet Mail Extension)
MIME is a way to encode different kinds of data, such as sound and text, to be transmitted over a 7-bit ASCII connection. It also lets the recipient know what kind of data has been sent, so that it can be displayed properly. MIME was originally designed to facilitate multimedia email and to provide an encoding that could get binary data past the most train –damaged mail transfer programs.
MIME is an open standard for sending multipart, multimedia data through Internet email. MIME was originally intended for email, it has become a widely used technique to describe a file’s contents so that client software can tell the difference between different kinds of data.
8. DEFINE URL & URN.
Uniform Recourse Locator is a way to unambiguously identify the location of a resource on the Interned.
URI Uniform Resource Identifier is a string of characters in a particular syntax that identifies a resource.
The resource identified may be a file on a server, but it may also be an email address, a news message, b book, a person’s name, an Internet host.
data – base 64 encoded data included directly in a link
file – A file on a local disk
FTP – An FTP server
gopher – a Gopher server
mailto – an email address
news – A Usenet newsgroup
Telnet – A connection to a Telnet based service (only used in Remote Login System)
urn – Uniform Resource Name
9. EXPLAIN ABOUT URN
There are 2 types of URLs.
URL – Unform Resource Locaters (is a pointer to a particular resource on the Internet at a particular location.)
URNs – Uniform Resource Name (is a name for a particular resource but without reference to a particular location)
SYNTAX OF URN
namespace - is the name of a collection of certain kinds of resources maintained by some authority.
resource-name – is the name of a resource within that collection.
10. WHAT IS MEANT BY RELATIVE URL?
URLs that are not complete but inherit pieces from their parent are called relative URL.
In contrast, a completely specified URL is called an absolute URL address.
11. EXPLAIN ABOUT SGML – STANDARD GENERALIZED MARKUP LANGUAGE
• HTML is an instance of SGML.
• SGML was invented beginning in the mid-1970s by Charles Goldfarb at IBM
• SGML is now an International Standards Organization (ISO) standard, specifically ISO 8879:1986.
• SGML allows the user to create various user defined tags easily without any rules.
EXAMPLE 1 – FOR PRODUCT DETAILS
<PRODUCT MANUFACTURER=”ABC COMPANY”> -Assumed as record name
<NAME> KEY BOARD </NAME>
<TYPE> KEY BOARD </TYPE>
<PRICE> 1500 </PRICE>
12. EXPLAIN ABOUT XML – EXTENSIBLE MARKUP LANGUAGE
• Similar to SGML
• Allows the user to create any number of user defined tags.
• The value of an attribute may be enclosed in double of single quotes like this:
• <H1 ALIGN=CENTER> THIS IS CENTERED H1 HEADING </H1>
• STYLES can be introduced for XML program like CSS using XLS file(XML Style Sheet program)
• Here XML styles are saved with an extension of .xls (XML style sheet)
• Using .xls files various styles can be given to the data which is inside the XML program.
13. LIST THE STEPS FUNCTIONS OF HTTP PROTOCOL.
Standard protocol for communication between web browsers and web servers.
HTTP specifies how a client and server establish a connection, how the client requests data from the server, how the server responds to that request, and finally how the connection is closed.
HTTP 1.0 is the currently accepted version of the protocol. It uses MIME to encode data. The basic protocol defines a sequence of 4 steps for each request from a client to the server.
Making the connection
Making a request
Receiving the response
Closing the connection
14. WHAT IS DOMAIN & MENTION DIFFERENT TYPES OF DOMAINS
Domain is a place where information is available.
DOMAIN NAME EXTENSION
.edu – Servers that provide Educational services
.gov – About the government of a country.
.mil – Servers that provide military information.
.org – Provide information about the organizations in the world.
.com – Servers providing commercial services on the Internet.
15. WRITE THE FORMAT OF HTML PROGRAM
<TITLE> This is the Title </TITLE>
…. Type the body of the program
Note: All the tags in HTML program are optional, however the file should be saved in .html extension.
16. MENTION SOME TEXT FORMATTING TAGS
<p> </p> - is used for introducing various paragraphs.
<br> - this tag is used for giving an empty blank line.
HEADING TAGS - <h1> </h1> .. <h6> </h6> is used to introduce various headings.
<h1> is the biggest and h6 is the smallest heading tag.
<HR> TAG – is used to draw lines and horizontal rules.
<B>,<I>,<U> for bold, italic and underline respectively.
17. EXPLAIN ABOUT LIST TAG.
TYPES OF LISTS
It starts with <ul> and ends with </ul>
Attributes of Unordered lists
TYPE = FILLROUND or TYPE = SQUARE
<UL TYPE = FILLGROUND>
<LI> CSE </LI>
<LI> IT </LI>
ORDERED LISTS (NUMBERING>
TYPE: Controls the numbering scheme to be used
TYPE = “1” will give counting numbers (1,2,…>
“A” will give A,B,C..
“a” will give a,b,c
“I” starts with Capital roman letters I,II,II…
“I” starts with small case roman letters
START: Alters the numbering sequence, can be set to any numeric value
VALUE: Change the numbering sequence in the middle of an ordered list
<OL TYPE = “1” START = 5>
<LI> CSE </LI>
<LI> IT </LI>
18. EXPLAIN THE ATTRIBUTES OF TABLE TAG WITH AN EXAMPLE
A table is a two dimensional matrix, consisting of rows and columns. All table related tags are included between <TABLE> </TABLE> tags.
<TH> Heading </TH>
<TR> Row elements </TR>
<TD> Table data values </TD>
ATTRIBUTES OF TABLE TAG
ALIGN Horizontal alignment is controlled by the ALIGN attribute. It can be set to LEFT, CENTER, or RIGHT VALIGN Controls the vertical alignment of cell contents. It accepts the values TOP, MIDDLE or BOTTOM WIDTH Sets the WIDTH of a specific number of pixels or to a percentage of the available screen width.
BORDER Controls the border to be placed around the table.
CELLPADING This attribute controls the distance between the data in a cell and the boundaries of the cell
CELLSPACING Controls the spacing between adjacent cells
COLSPAN Used to spilt the single cell to one or more columns
ROWSPAN Used to spilt the single cell to one or more rows.
<TABLE BORDER = 3 WIDTH = 100 HEIGHT = 200>
<TH> Roll Number </TH>
<TH> Age </TH>
<TR> <TD> 1 </TD> <TD 35 </TD> </TR>
ALIGN: ALIGN = TOP, MIDDLE,BOTTOM
BORDER: Specifies the size of the border to place around the image.
WIDTH: Specifies the width of the image in pixels.
HEIGHT: Specifies the height of the image in pixels
HSPACE: Indicates the amount of space to the left and right of the image
VSPACE: Indicates the amount of apace to the top and bottom of the image.
19. WHAT DO YOU MEAN BY COLUMN SPANNING AND ROW SPANNING?
Row spanning is used to merge (combine) two or more rows.
Column spanning is used to merge (combine) two or more columns.
20. MENTION THE DIFFERENT TYPES OF LINKS
HTML allows linking to other HTML documents as well as images. There are 3 attributes that can be introduced in BODY tag.
LINK – Changes the default color of a Hyperlink to whatever color is specified with this tag.
ALINK – Changes the default color of a hyperlink that is activated to whatever color is specified with this tag.
VLINK – Changes the default color of a hyperlink that is already visited to whatever color is specified with this tag.
NOTE: User can specify the color name of a hyperlink or an equivalent hexadecimal number.
<A HREF = “location name”> Hyper Text Message </A>
21. EXPLAIN IMAGE MAPS WITH ITS SYNTAX
When a hyperlink is created on an image, clicking on any part of the image will lead to opening of the document specified in the <A HREF TAG>. Linked regions of an image map are called hot regions and each hot region is associated with
<MAP NAME = “map name”>
ATTRIBUTES OF IMAGE MAPS
COORDS: Each of the above shapes takes different coordinates as parameters.
Rectangle – 4 coordinates (x1,y2,x3,y2)
POLYGON: 3 or more coordinates.
HREF – Takes the name of the .html file that s linked to the particular area on the
<MAP NAME = “fish.jpg”>
<AREA SHAPE = “rect” COORDS = “52,65,122,89” HREF = “sct.html”>
22. EXPLAIN ABOUT HTML FORM TAG WITH ITS ATTRIBUTES.
HTML form provides several mechanisms to collect information from people viewing your site. The syntax of the form is
<FORM METHOD = “POST” ACTION = “/cgi-bin/formail”>
• The METHOD attribute indicates the way the web server will organize and send you the form output.
• Use METHOD = “post” in a form that causes changes to server data, for example when updating a database.
• The ACTION attribute in the FORM tag is the path to this script; in this case, it is a common script which emails form data to an address. Most Internet Service Providers will have a script like this on their site.
23. MENTION THE VARIOUS FORM ELEMENTS.
Various elements or controls can be created in FORM using <INPUT> tag. They are 1. Label 2. Text box 3. Text Area 4. Radio button 5. Check box 6. List box 7. Command button 8. Scroll bars
24. WHAT IS THE USE OF FRAMES IN HTML GIVE THE SYNTAX OF FRAMES
Frames are used to call many html files at the same time. This can be done using <FRAMESET> </FRAMESET> tags.
ATTRIBUTES OF FRAMES
ROWS – This attribute is used to divide the screen into multiple rows. It can be set equal to a list of values. Depending on the required size of each row. The values can
• A number of pixels
• Expressed as a percentage of the screen resolution
• The symbol *, which indicates the remaining space.
COLS – This attribute is used to divide the screen into multiple columns.
<FRAMESET ROWS = “30%,*”> => Divides the screen into 2 rows,
• occupying the remaining space
<FRAMESET COLS = “50%,50%”> => Divides the first row into 2 equal
<FRAME SRC = “file1.html”>
<FRAME SRC = “file2.html”>
<FRAMESET COLS = “50%,50%”> => Divides the second
row into 2 equal columns
<FRAME SRC = file3.html”>
<FRAME SRC = file4.html”>
25. What is the difference between node and host?
A node is any addressable device connected to a network whereas the host is a more specific descriptor that refers to a networked general-purpose computer rather than a single purpose device (such as a printer).
26. Define protocol.
A protocol is a formal set of rules that must be followed in order to communicate.
27. Define port.
A port is a logical channel to an application running on a host. ie., The applications running on the host machines are uniquely identified by port numbers.
28. What do you mean by well-known ports?
Port numbers can range from 1 to 65535, however ports 1 to 1023 are reserved. These reserved ports are referred to as we1l-known ports because the Internet Assigned Numbers Authority publicly documents the applications that use them.
29. What is meant by Name Resolution?
Name Resolution is the process of mapping a hostname to its corresponding IP Address. One way to translate a hostname to an IP address is to look it up in a simple text file. The second way is the domain name service, which is a distributed database containing all registered hostnames on the Internet and their IP addresses.
30. Define URI, URL, URN.
• URI (Uniform Resource Identifier): It identifies an object on the Internet.
• URL (Uniform Resource Locator): It is a specification for identifying an object such as a file, newsgroup, CGI program or e-mail address by indicating the exact location on the internet.
• URN (Uniform Resource Name): It is a method for referencing an object without declaring the full path to the object.
31. What are the components of HTTP URL?
The components are host, an optional port, path, filename, section and query string.
32. Define URL encoding.
URL encoding involves replacing all unsafe and nonprintable characters with a percent sign (%) followed by two hexadecimal digits corresponding to the character\'s ASCII value.
33. What are the issues of next generation IP?
The issues to be considered in IP next generation are
o Addresses Space Growth
o Support large Global networks
o A clear way of transition from the existing IP to new IP next generation
34. List the goals of SGML.
• To manage the flow of millions of pages.
• For structuring information exchange
• For modeling inter-document linkages
• For managing information flows between departments and weapons systems
35. What is the role of server?
• Manages application tasks
• Handles storage
• Handles security
• Provides scalability
• Handles accounting and distribution
36. What are the necessities of using HTML forms?
1. Gathering user information
2. Conducting Surveys
3. Interactive services
37. What are the sequences of steps for each HTTP request from a client to the server?
1. Making the connection
2. Making a request
3. The response
4. Closing the connection
38. List the predefined MIME content types.
39. Define HTML.
It is a simple page description language, which enables document creation for the web.
40. What is meant by loop back address?
A zone that enables the server to direct traffic to itself. The host number is almost always 127.0.0.1.
41. Explain about HTTP Connection.
It is a communication channel between web browser and web server. It begins on the client side with the browser sending a request to the web server for a document.
Request Header Fields are
5. User Agent
42. What do mean by search engine?
It is a program or web page that enables you to search an Internet site for a specific keywords or words.
43. How do search engine work?
When you enter a keyword, the search engine examines its online database and presents to you a listing of sites that, in theory , match your search criteria.
44. Discuss about the client/server strategies in Internet.
• Application Server
• Database Server
• Transaction Server
• Six client/server models
45. Explain about <table> & <frame> tags in detail..
i. Syntax of <table> tag:
iii. <TR>…</TR> <!—Row1_
iv. <TR>…</TR> <!—Row2_
vi. <TR>…</TR> <!—Rowm_
viii. Syntax of <frame> tag:
ix. <frameset rows=” “, cols=” “>
x. <frame name=” “ src=” “>
xi. <frame name=” “ src=” “>
xiii. <frame name=” “ src=” “>
46. Explain about Internet servers.
• Mail servers
• Web servers
• FTP servers
• News server
• DNS servers
47. Explain the elements of WWW.
• Client & server
• Web languages & protocols
• Web pages
• Home page
• Web browsers
• Web sites
48. Explain HTML forms in detail along with form elements, attributes & methods.
<form method=”how to send” ACTION=”URL of script”>
Form fields & attributes:
i. <TEXTAREA> element
ii. <INPUT> tag: text, password, checkbox, radio, hidden, reset, submit,
iii. <SELECT> tag
49. What are the ways by which a server and a browser do communicate?
GET & POST method
Web server to CGI communication
1. URL interpretation
2. CGI environment variables
CGI program to web server communication
• Parsed header
• Bypassing the server
50. What is HTML?
HyperText Markup Language. This is a file format, based on SGML, for hypertext documents on the Internet. It is very simple and allows for the embedding of images, sounds, video streams, form fields and simple text formatting. References to other objects are embedded using URLs. HTML is a plain text file with commands <markup tags> to tell the Web browsers how to display the file.
51. How do you change the color of background or text in HTML?
Include the element \"bgcolor\" with a color code in your body tag:
<BODY BGCOLOR=\"#ffffff\" TEXT=\"#000000\" LINK=\"#cc0000\"
52. How do you use a picture as the background in HTML?
Include the element \"background\" with the name of the graphics file:
<BODY BACKGROUND=\"gumby.gif\" BGCOLOR=\"#ffffff\" TEXT=\"#000000\"
LINK=\"#cc0000\" VLINK=\"#000066\" ALINK=\"#ffff00\">
53. How do you add music to a web page?
<A HREF=\"http://www.snowhawk.com/sounds/hvnearth.mid\">Heaven on Earth</A>
54. How do you align text next to a graphic in HTML?
<IMG SRC=\"wflower.jpg\" WIDTH=\"25\" HEIGHT=\"25\" ALIGN=\"top\" BORDER=\"0\" ALT=\"wildflower photo\"> Photo of wildflowers in Texas</A>
55. How do you make a graphic a link?
<AHREF=\"http://www.snowhawk.com/wildlife.html\"><IMG SRC=\"leopard.jpg\" WIDTH=\"25\" HEIGHT=\"25\" ALIGN=\"top\" BORDER=\"0\" ALT=\"link to wildlife\"></A>
56. How do you make a new paragraph in HTML?
Inserting the <P> tag at the beginning of your paragraph will drop the text down two lines. (If you insert the <BR> tag, it will drop your text down one line.)
57. How do you make headings and text larger or smaller?
There are 6 sizes to the heading tags:
This is using the <H1> tag
This is using the <H2> tag
This is using the <H3> tag
This is using the <H4> tag
This is using the <H5> tag
This is using the <H6> tag
58. How do you make text show as bold?
Placing the <B>tag before the text will make everything bold, until you close the tag with</B> (Or using <STRONG>tags</STRONG > will do the same.)
59. How do I make text show in italics?
Placing the <I>tag before the text will make everything in italics, until you close the tag with</I> (Using <EM>emphasis tags</EM > will do the same.)
60. How would you make all text on a page green and a little larger than normal, but make all headings yellow?
Put the following at the beginning of the Web page:
<BODY TEXT=”green”><BASEFONT SIZE=4>
Then make each heading look like this:
<H1><FONT COLOR=”Yellow”>Heading goes here </FONT></H1>
61. Write the HTML to create the following ordered list.
<OL TYPE =”A” START = “24”>
The following alternative will also do the same things.
<OL TYPE =”A”<LI VALUE =”24”>Xylophone<LI>Yak<LI>Zebra</OL>
62. How would you insert a single word and put a square bullet in front of it?
63. How would you insert an image file named elephant.jpg at the very top of a Web page?
Copy the image file into the same directory folder as the HTML text file and type <IMG SRC> immediately after the <BODY> tag in the HTML text file
64. How would you give a Web page a black background and make all text, including links, bright green?
Put the following at the beginning of the Web page:
The following would do the same thing”
<BODY BGCOLOR =”#000000”
TEXT=”#00FF00” LINK=”00FF00” VLINK=”#000000”>
65. How would you make an image file named texture.jpg appear as a background tile?
TEXT=”White” LINK=”red” VLINK=”blue” ALINK=”black”>
66. How would you wrap text around the right side of an image, leaving 40 pixels of space between the image and the text?
<IMG SRC=”myimage.gif” HSPACE=40 VSPACE=40 ALIGN=”left”>Text goes here
67. How could you insert exactly 80 pixels of blank space between two paragraphs of text?
Create a small image that is all one color, and save it as nothing.gif with that color set to be transparent. Then put the following tag between the two paragraphs of text:
<IMG SRC=”nothing.gif” WIDTH=1 HEIGHT=80>
68. How would you write the HTML to draw a rule 20 pixels wide?
69. If you have a circular button that links to another page, how do you prevent a rectangle from appearing around it?
Use the BORDER=0 attribute, like this:
<A HREF=”another_page.htm”><IMG SRC=”circle.gif” BORDER=0></A>
70. What is meant by Stateless Connection?
When a web server receives a HTTP request from a web browser it evaluates the request and returns the requested document, if it exists, and then breaks the HTTP connection.This document is preceded by the response header, which has details about how to display thedocument that will be sent by the server. Each time a request is made to the server, it is as ifthere was no prior connection and each request can yield only a single document. This isknown as Stateless Connection.