You are on page 1of 11

INTERNET AND WEB TECHNOLOGY

Internet and Web Technology-2013


Branch: CSE

1. When we type address into the web browser, how does it know which server to get the page from?
Ans: The browser will check for the cache. If it exists then it opens the page otherwise it asks the OS for
server's IP address. OS makes the Domain Name Server to find the IP of the correspoing website name. The
DNS returns the IP of the server to the broser then the browser open a TCP connection to server and then the
broser send the HTTP request through TCP connection.

2. What is HTML? How to check the correctness of the HTML program?


Ans: HTML is a markup language for describing web documents (web pages).HTML stands for Hyper Text
Markup Language. A markup language is a set of markup tags. HTML documents are described by HTML
tags. Each HTML tag describes different document content.
HTML is not having any compiler or interpreter so we can not directly check the correctness. We can use the
Eclipse or Edit plus editor to edit the HTML code. These editors display the HTML tags with different color
and indentation. From which we can check the correctness of the HTML code.

3. What is the difference between Java and JavaScript?


Ans: Java is an Object Oriented Programming language where as JavaScript is an Object Based Scripting
Language. Programming languages are languages having their own comiler or interpreter and they are used
to solve problems independently whereas the Scripting languages are the languages that cannot be executed
independently. They are associated with other languages like HTML to be executed.

4. What is the difference between External style sheet and Internal style sheet?
Ans: The stylesheet that is created in a separate file is known as External style sheet. This is saved with the
extension .css. The external style sheets can be used in different web pages. Internal style sheet is the style
sheet that is defined in the head section of the page.

5. What are the building blocks of CGI?


Ans: A CGI program is a computer program that is started and run by a web server in response to an HTTP
request. CGI programs can be developed in many languages like C, C++, VB Script, PERL etc. So there is
no specific building block and CGI.

6. How to specify page breaks in HTML? Explain with suitable example.


Ans: This can be done using <br> tag.
e.g.
<html>
<body>
<p>This is a paragraph. <br>This contains the data about HTML</p>
</body>
</html>

7. What is an internet protocol? Name different protocols used by user applications to interact with other
computers.
Ans: Internet Protocol is connectionless and unreliable protocol. It ensures no guarantee of successfully
transmission of data. In order to make it reliable, it must be paired with reliable protocol such as TCP at the
transport layer. Internet protocol transmits the data in form of a datagram. The different protocols used are
HTTP, TCP, FTP etc.

8. How do you submit a Form using JavaScript?


Ans: A form can be submitted by two methods, GET and POST

9. Define and Differentiate between static and dynamic HTML.


Ans:
The easiest difference is static HTML once rendered cannot be changed on the other hand dynamic
HTML can be changed.

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 1


INTERNET AND WEB TECHNOLOGY

Static web pages cannot have database access but dynamic pages can be connected to database.
Using static HTML no interactions persist between user and server but dynamic HTML has
capability to interact with the user.
Static HTML does not require server side coding but dynamic HTML requires server side coding.
No animation, games can be developed using the static HTML but on the other hand dynamic HTML
can perform this task.

10. What is CGI? It is a Script or Program? Justify your answer.


Ans: It is a specification define by the W3C (World Wide Web Consortium), defining how a program
interacts with a HTTP (hypertext transfer protocol) server. It provides a middleware between WWW servers
and external databases and information sources. It is not a script rather it is implemented using PERL script.
CGI programs can be written in many languages like C, C++, PERL etc. The best suitable language is PERL.

Internet and Web Technology-2013


Branch: CSE
1.
a. Define a Protocol.
Ans: Protocol is a uniform set of rules that enable two devices to connect and transmit data to one another.
Protocols determine how data are transmitted between computing devices and over networks. They define
issues such as error control and data compression methods.

b. Write an HTML code to make a picture as back ground in a web page.


Ans: If you want to put an image in the background of your web page,

you should use CSS and apply the background-image property to the BODY element. In your style
sheet, write:
body {
background-image: URL;
}

The URL is the location of the image you want in the background.

You can use the background property in the same way:

body {
background: URL;
}

c. Write the code for an HTML table for one row and one column.
Ans:
<table style="width:100%">
<tr>
<td>Jill</td>
</tr>
</table>

d. What is defined by <!doctype>in html?


Ans: The <!DOCTYPE> declaration helps the browser to display a web page correctly. There are different
document types on the web. To display a document correctly, the browser must know both type and version.

e. What is the difference between static and dynamic html?


Ans:

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 2


INTERNET AND WEB TECHNOLOGY

The easiest difference is static HTML once rendered cannot be changed on the other hand dynamic
HTML can be changed.
Static web pages cannot have database access but dynamic pages can be connected to database.
Using static HTML no interactions persist between user and server but dynamic HTML has
capability to interact with the user.
Static HTML does not require server side coding but dynamic HTML requires server side coding.
No animation, games can be developed using the static HTML but on the other hand dynamic HTML
can perform this task.

f. What is difference between == and === in java script?


Ans: == is used for checking both operands value is same or not where as === is used for checking both
operands value and data type are same or not

g. How can you target an element in your HTMLusing the DOM?


Ans: The target property sets or returns the value of the target attribute in a form. The target attribute
specifies a name or a keyword that indicates where to display the response that is received after submitting
the form.
Syntax
Return the target property:
formObject.target
Set the target property:
formObject.target="_blank|_self|_parent|_top|framename"
Example:
var x = document.getElementById("myForm").target;

h. What is an abstract class?


Ans: Abstract classes are classes that contain one or more abstract methods. An abstract method is a method
that is declared, but contains no implementation. Abstract classes may not be instantiated, and require
subclasses to provide implementations for the abstract methods.

i. What is package?
Ans: A package is a namespace that organizes a set of related classes and interfaces.

j. What is the difference between method overloading and overriding in java?


Ans: Overloading and overriding are completely different. Only the notion about interface (function) name is
same. Overloading is the ability to use same interface name but with different arguments. Purpose of
functions might be same but the way they work will differ based on the argument types. Overriding is
applicable in the context of inheritance. When there is a need to change the behavior of a particular inherited
method, it will be overridden in the sub-class.

Internet and Web Technology-2012


Branch: CSE
1.
a. Define a Protocol
Ans: Protocol is a uniform set of rules that enable two devices to connect and transmit data to one another.
Protocols determine how data are transmitted between computing devices and over networks. They define
issues such as error control and data compression methods.

b. What is the use of span tag?


Ans: The <span> tag is used to group inline-elements in a document. It provides no visual change by itself. It
provides a way to add a hook to a part of a text or a part of a document. A <span> element used to color a
part of a text:

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 3


INTERNET AND WEB TECHNOLOGY

<p>My mother has <span style="color:blue">blue</span> eyes.</p>

c. What is hyperlink?
Ans: A hyperlink is a word, phrase, or image that you can click on to jump to a new document or a new
section within the current document.

d. Which attribute is used to assign width of the table?


Ans: The width attribute specifies the width of a table.
CSS syntax: <table style="width:400px">

e. Can the arithmatic operation be accomplished in HTML


Ans: Yes,Using MATH element we can perform arithmatic operation in HTML
<MATH>&int;_a_^b^{f(x)<over>1+x} dx</MATH>

f. Write some application of CSS.


Ans: Use of CSS is the recommended way of defining how HTML pages are displayed. You should use
HTML to define the basic structure (using elements such as <h1>, <p>, <li>, etc.) and CSS to define how
these elements should appear (e.g. heading should be in bold Arial font, paragraphs should be indented, etc.).

g. Name two web servers.


Ans: Apache Tomcat
Microsoft's Internet Information Services (IIS) Windows Server

h. Differentiate between GET and POST method.


Ans: Two commonly used methods for a request-response between a client and server are: GET and POST.
GET - Requests data from a specified resource
POST - Submits data to be processed to a specified resource

i. What is the use of input tag?

Ans: The <input> tag specifies an input field where the user can enter data. <input> elements are used within
a <form> element to declare input controls that allow users to input data. An input field can vary in many
ways, depending on the type attribute.

j.What is the difference between password and hidden field?


Ans: type="password"
INPUT tags with type="password" also create an empty box, but when the user types information in that
box, the characters are replaced by a masking character.
type="hidden"
INPUT tags with type="hidden" do not appear on the screen of the form, but are useful when the CGI script
being used requires information from the form. For instance, if you use the same script to process three
different HTML order forms, using a hidden field to identify which form was submitted is useful.

Internet and Web Technology-2011


Branch: CSE
1.
a. What is the difference between WWW and internet ?
Ans: The World Wide Web (abbreviated as WWW or W3, commonly known as the Web) is a system of
interlinked hypertext documents that are accessed via the Internet. With a web browser, one can view web
pages that may contain text, images, videos, and other multimedia and navigate between them via hyperlinks.

Internet refers to network of networks. In this network each computer is recognized by a globally
unique address known as IP address. A special computer DNS (Domain Name Server) is used to
give name to the IP Address so that user can locate a computer by a name. Internet is defined as an

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 4


INTERNET AND WEB TECHNOLOGY

Information super Highway, to access information over the web.

b. How TCP/IP is important for internet ?


Ans: TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication language or
protocol of the Internet. It can also be used as a communications protocol in a private network (either an
intranet or an extranet). When you are set up with direct access to the Internet, your computer is provided
with a copy of the TCP/IP program just as every other computer that you may send messages to or get
information from also has a copy of TCP/IP.

c. Which method is used in java script to convert a string lower case to upper case? Using this write a
java script program.
Ans: The toUpperCase() method converts a string to uppercase letters.

<!DOCTYPE html>
<html>
<body>
<p>Click the button to convert the string to uppercase letters.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var str = "Hello World!";
var res = str.toUpperCase();
document.getElementById("demo").innerHTML = res;
}
</script>
</body>
</html>

d. Hosw does <ins> and <del> tag works in HTML.Give examples to explain both these tags.
Ans: The <ins> tag defines a text that has been inserted into a document. A text with a deleted part, and a
new, inserted part:
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
The <del> tag defines text that has been deleted from a document. A text with a deleted part, and a new,
inserted part:
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>

e. What is the HTML code to display a partical frame by clicking any link in a web page?
Ans: <a href="page1.html" target="frame name">Go To Page 1</a>

f. Write a inline style to make the color of a paragraph red. Write an HTML code for this purpose.

Ans: <p style="color:red">This is a red paragraph</p>

g. Why DHTML is used?


Ans: Dynamic HTML, or DHTML, is an umbrella term for a collection of technologies used together to
create interactive and animated web sites by using a combination of a static markup language (such as
HTML), a client-side scripting language (such as JavaScript), a presentation definition language (such as
CSS), and the Document Object Model.

h. Why CGI is used?


Ans: The common gateway interface (CGI) is a standard way for a Web server to pass a Web user's request to
an application program and to receive data back to forward to the user.

i. How to test and debug a CGI/PERL script.


Ans: Using die,confess,warn,cloak,croack function testing debugging operation is possible in CGI/PERL
script.

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 5


INTERNET AND WEB TECHNOLOGY

j. Give an example of accepting input using JOptionPane.


Ans: JOptionPane.showInputDialog(null, "text");

Internet and Web Technology-2010


Short Question Answer
1. Distinguish between WWW and Internet.

Ans: The World Wide Web (abbreviated as WWW or W3, commonly known as the Web) is a system of
interlinked hypertext documents that are accessed via the Internet. With a web browser, one can view web
pages that may contain text, images, videos, and other multimedia and navigate between them via hyperlinks.

Internet refers to network of networks. In this network each computer is recognized by a globally unique
address known as IP address. A special computer DNS (Domain Name Server) is used to give name to the IP
Address so that user can locate a computer by a name. Internet is defined as an Information super Highway,
to access information over the web.

2. What is the role of a browser?

Ans: A Browser is application software that allows us to view and explore information on the web. User can
request for any web page by just entering a URL into address bar. Web browser can show text, audio, video,
animation and more. It is the responsibility of a web browser to interpret text and commands contained in the
web page.

3. Briefly explain about Apache web server

Ans: This is the most popular web server in the world developed by the Apache Software Foundation.
Apache web server is an open source software and can be installed on almost all operating systems including
Linux, UNIX, Windows, FreeBSD, Mac OS X and more. About 60% of the web server machines run the
Apache Web Server.

4. Identify various design criteria for a web site.

Ans: The various design criteria are


a. Define the Project
This first stage consists of gathering and analyzing the information necessary to clearly identify the
scope of the project and then prepare for kick-off. You will start by asking a lot of questions, and you
will collect a lot of data that will be used to shape and communicate the expectations of the project.

b. Develop Site Structure & Organize Content


In this stage we take a look at the content that our client has given us. We take that content page-by-page
and try to write an outline of the entire site. This outline can be represented using a site map, which
visually shows each section and page of the site and how those pages interlink.

c. Design Graphic User Interfaces


A graphic user interface or GUI is simply the visual elements of a Web site that users see and use-buttons
that are clicked on, the placement of content, the typography, color schemes and other design elements.

d. Build Web Site


In practice, the actual building a Web site consists of the following steps:
i. Create a basic XHTML template to structure the information for each web page
ii. Produce Web-ready images (JPGs, PNGs, GIFs) for use in the Web site's graphic user interface
iii. Create the Cascading Style Sheet to produce the designer graphic user interface
iv. Modify the XHTML template as needed to meet the needs of the CSS

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 6


INTERNET AND WEB TECHNOLOGY

v. Copy finished XHTML template for each page in the site


vi. Copy, paste, and markup content for each web page
vii. Proof-read, error-check, and usability-test each and every page

e. Produce & Publish Web Site


Once the Web site and all its pages are complete, you can't just leave them on your computer! You have
to publish them on the World Wide Web for the public to view. This final stage consists of two steps:
i. Upload the Web site to a public Web server
ii. Employ a variety of strategies to publicize the site

5. Explain why forms and frames are used in static web pages?

Ans: Forms are used to create a page with some input fields to get the input from the user in a web page for
further processing. Where as a frame is used to divide one page into a number of sections where each section
can hold a different web page i.e. we can display a number of web pages in a sinle page using frame.

6. What is XML and how it is different from HTML?

Ans: XML stands for EXtensible Markup Language. XML was designed to describe data. XML is a
software- and hardware-independent tool for carrying information. Basically it is used to store web
databases. In XML all the tags are user defined and It is case sensitive.

HTML is a markup language for describing web documents (web pages).HTML stands for Hyper Text
Markup Language. A markup language is a set of markup tags. HTML documents are described by HTML
tags. Each HTML tag describes different document content

7. How PERL is useful to write CGI script?

Ans: A CGI program can be written in C, C++, VB Script, PERL, TCL, REXX, Python, Icon, AppletScript,
Unix shell script and even DOS Batch files, but PERL is especially stuited for this because PERL programs
are easy to learn and write. PERL has great text-processing capabilities (CGI programs have to process the
URL-enclosed text data and print HTML text to standard output), which is why it was a natural choice for
some of the first CGI sample programs provided by National Center for Supercomputing Applications.
PERL can often accomplish the same task as a C or C++ program with far fewer lines of code, it has become
the most widely used option for custom CGI Scripts.
Besides this PERL is a scripting language, which means it does not have to be compiled. Instead, an
intepreter excutes the PERL script, this makes it easy to write and test PERL scripts, because they do not
have to go through the typical edit-compile-link cycle or compiler based programs.

8. How can you find a clients' browser name using JavaScript?

Ans: JavaScript provides a predefined object i.e. navigator object. This navigator object is having a property
named appName that return the browser's name.
e.g.
document.write(Browser Name + navigator.appName );

9. Discuss about the error handling in JavaScript.

Ans: The onerror event handler was the first feature to facilitate error handling for JavaScript. The
errorevent is fired on the window object whenever an exception occurs on the page. Example:

The onerror event handler provides three pieces of information to identify the exact nature of the error:

Error message . The same message that the browser would display for the given error
URL . The file in which the error occurred
Line number . The line number in the given URL that caused the error
e.g.

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 7


INTERNET AND WEB TECHNOLOGY

window.onerror = function (msg, url, line) {


alert("Message : " + msg ); alert("url : " + url );
alert("Line number : " + line );
}
10. What is page redirection?

Ans: When you click a URL to reach to a page X but internally you are
directed to another page Y that simply happens because of page re-
direction.

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 8


INTERNET AND WEB TECHNOLOGY

Some other Important Questions with Answer

1. Define the term WWW. What are the various features of WWW?
Ans: The World Wide Web (abbreviated as WWW or W3, commonly known as the Web) is a system of
interlinked hypertext documents that are accessed via the Internet. With a web browser, one can view web
pages that may contain text, images, videos, and other multimedia and navigate between them via hyperlinks.
Features of WWW
a) HyperText Information System
b) Cross-Platform
c) Distributed
d) Open Standards and Open Source
e) Web Browser: provides a single interface to many services
f) Dynamic, Interactive, Evolving

2. Write the main difference between relative URL and absolute URL.
Ans: Absolute URL is a complete address of a resource on the web. This completed address comprises of
protocol used, server name, path name and file name.
For example http:// www.tutorialspoint.com / internet_technology /index.htm.

Relative URL is a partial address of a webpage. Unlike absolute URL, the protocol and server part are
omitted from relative URL. Relative URLs are used for internal links i.e. to create links to file that are part
of same website as the WebPages on which you are placing the link. For example, to link an image on
tutorialspoint.com/internet_technology/internet_referemce_models, we can use the relative URL which can
take the form like/internet_technologies/internet-osi_model.jpg.

3. What is the difference between static and dynamic webpage?


Ans: Static web pages are also known as flat or stationary web page. They are loaded on the clients browser
as exactly they are stored on the web server. Such web pages contain only static information. User can only
read the information but cant do any modification or interact with the information.
Dynamic web page shows different information at different point of time. It is possible to change a portaion
of a web page without loading the entire web page. It has been made possible using Ajax technology.

5. What are the differnet kinds of comments supported by java script?


Ans: JavaScript supports both C-style and C++-style comments, Thus:

Any text between a // and the end of a line is treated as a comment and is ignored by JavaScript.
Any text between the characters /* and */ is treated as a comment. This may span multiple lines.
JavaScript also recognizes the HTML comment opening sequence <!--. JavaScript treats this as a
single-line comment, just as it does the // comment.
The HTML comment closing sequence --> is not recognized by JavaScript so it should be written
as //-->.

6. Name the different nodes in HTML DOM.


Ans: The Node object represents a single node in the document tree. A node can be an element node, an
attribute node, a text node, or any other of the node types.

7. Mention the syntax and usefullness of print function in perl script.


Ans: The print function is used to display the output.
Syntax:
print text / variable / escape sequence;

8. What is CSS and why it is used?


Ans: CSS stands for Cascading Style Sheet. Styles define how to display HTML elements. Styles were added
to HTML 4.0 to solve a problem. External Style Sheets can save a lot of work. External Style Sheets are
stored in CSS files

9. When a form submits data via the POST method the CGI program receives information through which

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 9


INTERNET AND WEB TECHNOLOGY

environment variable?
Ans: CONTENT_LENGTH

10. When a form submits data via the GET method the CGI program receives information through which
environment variable?
Ans: QUERY_STRING

10. Outline the important differences between java applet and simple program.
Ans: Java applet is used to add dynamic effect to web pages. The applet programs can not be executed
independently as they do not contain main() method. They are attached with HTML code to be executed.
Where as a simple java program can execute independently as it contains the main() method. It can be
compiled and executed.

11. What are the different types of Form validation?


Ans: Basic Form validation and Data Format Validation

12. Write an inline style to make the color of a paragraph red. Write an HTML code for this purpose.
Ans:
<html>
<body>
<p style= color:red>This is a paragraph</p>
</body>
</html>

13. What are the different types of variable used in PERL?


Ans: There are three types of variables
a) Scalar variable
b) Indexed Array variable
c) Associative Array variable

14. What are the different types of strings used in PERL?


Ans: There are three types of variables
a) Double quoted strings
b) Single quoted strings
c) Back quoted strings

15. What are the different fields of cookies?


Ans: The different fields of cookies are
Expires : The date the cookie will expire. If this is blank, the cookie will expire when the visitor
quits the browser.
Domain : The domain name of your site.
Path : The path to the directory or web page that set the cookie. This may be blank if you want to
retrieve the cookie from any directory or page.
Secure : If this field contains the word "secure" then the cookie may only be retrieved with a secure
server. If this field is blank, no such restriction exists.
Name=Value : Cookies are set and retrieved in the form of key and value pairs.

16. What is Domain Name Space?


Ans: The domain name space refers a hierarchy in the internet naming structure. This hierarchy has multiple
levels (from 0 to 127), with a root at the top.

17. What are the different Name Servers?


Ans: The different name servers are
a) Root Server
b) Primary Server
c) Secondary Server

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 10


INTERNET AND WEB TECHNOLOGY

18. List out the various web browsers that are commonly used.
Ans: Internet Explorer, Mozilla Firefox, Opera, Google Crome, Netscape Navigator, Safari etc.

19. List out the various web servers that are commonly used.
Ans: Apache tomcat, IIS (Internet Information Services), Java Web server etc.

20. What is a proxy server?


Ans: Proxy server is an intermediary server between client and the internet. Proxy servers offer the
following basic functionalities:
Firewall and network data filtering.
Network connection sharing
Data caching
Proxy servers allow hiding, concealing and making your network id anonymous by hiding your IP address.

21. What is a search engine?


Ans: Search Engine refers to a huge database of internet resources such as web pages, newsgroups,
programs, images etc. It helps to locate information on World Wide Web. User can search for any
information by passing query in form of keywords or phrase. It then searches for relevant information in its
database and return to the user.

22. What are the different components of search engine?


Ans: Generally there are three basic components of a search engine as listed below:
a) Web crawler: It is also known as spider or bots. It is a software component that traverses the web
to gather information.
b) Database: All the information on the web is stored in database. It consists of huge web resources.
c) Search Interfaces: This component is an interface between user and the database. It helps the user
to search through the database.

23. What is a cookie?


Ans: Cookies are usually small text files, given ID tags that are stored on your computer's browser directory
or program data subfolders. Cookies are created when you use your browser to visit a website that uses
cookies to keep track of your movements within the site, help you resume where you left off, remember your
registered login, theme selection, preferences, and other customization functions.

24. How to store a cookie in JavaScript?


Ans: The simplest way to create a cookie is to assign a string value to the document.cookie object, which
looks like this:
Syntax:
document.cookie = "key1=value1;key2=value2;expires=date";

25. Ho to read a cookie in JavaScript?


Ans: Reading a cookie is just as simple as writing one, because the value of the document.cookie object
is the cookie. So you can use this string whenever you want to access the cookie. The document.cookie
string will keep a list of name=value pairs separated by semicolons, where name is the name of a cookie and
value is its string value.

Prepared by: Avaya Kumar Ojha & Suren Kumar Sahu 11

You might also like