Web Technologies (Internet Technologies) Questions with Answers Set 1

Questions 1 to 10 

1. Which of the following options is correct with regard to HTML?

(a) It is a modelling language
(b) It is a DTP language
(c) It is a partial programming language
(d) It is used to structure documents
(e) It is a scripting language.

2. Consider the following statement:
GET /cgi-bin/dispenser.pl&want=whatsnew.html HTTP/1.0

Which of the following options is a correct one?

(a) The above statement is a part of a request from a web client
(b) The above statement is a part of the input to a CGI program
(c) want is a variable and whatsnew.html is a value
(d) want is a variable and whatsnew.html HTTP/1.0 is the value
(e) dispenser.pl may be a CGI program.

3. When trying to access a URL, the following message is displayed on the browser:
Server; Error 403

What could be the reason for the message?

(a) The requested HTML file is not available
(b) The URL refers to a CGI script and the header of the script does not indicate where the interpreter is located
(c) The path to the interpreter of the script file is invalid
(d) The first line of the output from the script is not a valid HTTP header
(e) The requested HTML file or CGI script has insufficient permission.

4. Which of the following statements is incorrect regarding multimedia on the web?

(a) The MPEG, AIFF and WAV are cross-platform formats
(b) The MPEG, AU and MIDI are cross-platform formats
(c) The SND format has a relatively low fidelity
(d) VRML can be used to model and display 3D interactive graphics
(e) The dynsrc attribute in the <img> element can be used to include videos in web pages.

5. What would be the colours of the RGB where the hexadecimal values are #FF0000, #00FF00 and  #0000FF respectively?

(a) Blue, Green, Red
(b) Green, Blue, Red
(c) Green, Red, Blue
(d) Red, Blue, Green
(e) Red, Green, Blue.

6. The elements <DIV> and <SPAN> have the following characteristics

(a) Element <DIV> inherits properties defined for <SPAN> in a stylesheet
(b) <DIV> and <SPAN> have no real meanings as html tags unless stylesheet is applied
(c) Elements <SPAN> and <DIV> define content to be inline or block-level
(d) <DIV> and <SPAN> are used as alternatives for the element <P>
(e) <DIV> is used inside element <P>.

7. Which of the following statement is not true regarding JavaScript?

(a) JavaScript is a loosely typed language
(b) JavaScript is an object-based language
(c) JavaScript is event driven
(d) A JavaScript embedded in an HTML document is compiled and executed by the client browser
(e) JavaScript can not run in stand-alone mode (without a browser).

8. The following is a web-page:

<head> <title>JavaScript</title> </head>
<body bgcolor="#0000ff">
<script language="JavaScript">
<!-- document.write("<h1> hello world </h1>"); //-->

When the above web page is loaded into a browser, what will happen?

(a) The body of the web page will not contain any text
(b) The body of the web page will contain the text “<h1> hello world </h1>”
(c) The body of the web page will contain the text “hello world” as an H1 heading
(d) The background color of the web page will be green
(e) document.write("<h1> hello world </h1 >”); is a comment.

9. The following statements are about three important browser objects in JavaScript.

I. window object : The highest of all objects in the client-side JavaScript object hierarchy. 
II. navigator object : A collection of information about the browser. Useful in browser sniffing.
III. document object : Provides access to the document being viewed. 
Which of the above statements is/are true?

(a) Only (I) above
(b) Only (II) above
(c) Only (III) above
(d) Both (I) and (II) above
(e) All (I), (II) and (III) above.

10. Consider the following script:

<script language="JavaScript">
var a=80
var b=(a==80 ? "pass" :"fail");

What will be the output of the above script?

(a) pass
(b) fail
(c) null
(d) 80
(e) Error at line 6.


Answer Reason

1. D         All the other options are wrong and incorrect for the question asked.

2. E         All the other options are wrong and incorrect for the question asked.

3. E         Server error 403 means insufficient permission.

4. A         All the other options are correct for the question asked.

5. E         The values are hexadecimal equivalent for Red, Green, Blue.

6. C         According to the specifications of <SPAN> and <DIV> they are used to define  
                        the  contents inline or block level.

7. D         As the remaining all the options are correct and valid for JavaScript.

8. A         Because of the comment nothing will be printed.

9. E         According to the definitions of browser objects, all the statements are true.

10. A         Because the outcome of the ternary operator.