Professional Documents
Culture Documents
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.
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.
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.
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.
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.
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>
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.
i. What is package?
Ans: A package is a namespace that organizes a set of related classes and interfaces.
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.
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.
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
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: 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.
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.
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.
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.
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
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.
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 );
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.
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.
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.
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 //-->.
9. When a form submits data via the POST method the CGI program receives information through which
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.
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>
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.