Web Technologies | Internet Technologies Set 2

Questions 11 to 20


11. The following web page is loaded into a web server:

<html>
<head><title>JavaScript question</title></head>
<body>
<script language="JavaScript">
book = new Array(1,2,3,4,5,6,7,8);
document.write(book[1]);
book[10]=10;
document.write(book[10]);
</script>
</body>
</html>

Once the above web page is loaded what will its body contain?

(a) 2
10
(b) 1
10
(c) 110
(d) 210
(e) Error at line 7.

12. Which of the following statements is false regarding “Cookies”?

(a) Cookies are programs which run in the background of the web-client
(b) Cookies have the potential of being used to violate the privacy of users
(c) Cookies are very helpful in keeping track of users in developing online shopping cart applications, personalized portals and in advertising on web sites
(d) Cookies cannot contain more than 4Kb of data
(e) Cookies usually contain data in the form of name = value pairs.

13. Consider the following script:

<html>
<head><title>JavaScript</title></head>
<body>
<script language="JavaScript">
document.write((125/5)%12);
</script>
</body>
</html>

What would be the output of the above script?

(a) 0
(b) 1
(c) 2.083
(d) 3
(e) 25%12.

14. Which of the following statements is true regarding HTTP?

(a) Web browsers use only HTTP as a communication protocol with servers
(b) It does not maintain any connection information on previous transactions 
(c) It is designed to route information based on content
(d) It refers to resources using their Universal Resource Identifier (URI)
(e) It does not carry browser information to the server.

15. Which of the following is true about XHTML?

(a) It is a new hybrid technology that is different from both XML and HTML
(b) It has totally replaced HTML as the tool for building Web pages
(c) It is a reformulation of HTML in XML 
(d) One cannot use it to create Web pages
(e) It has to be converted to HTML using a style sheet.

16. While working on a JavaScript project, in your JavaScript application, which function would you use to send messages to users requesting for text input?

(a) Display() 
(b) Prompt() 
(c) Alert() 
(d) GetInput() 
(e) Confirm().

17. Consider the following syntax:

<MAP NAME="World Map"> 
<Area Coords="0,0, 100, 200" HREF="homepage.html"> 
</MAP>

When would you use the above syntax?

(a) When defining an image map 
(b) When referring back to homepage.html 
(c) When referring to World Map 
(d) When embedding a graphic in JavaScript 
(e) When aligning an image on a web page using JavaScript.

18. Which of the following is true about client-side script use in HTML documents?

(a) Java, JavaScript, Jscript and VBScript are used on many web sites as Scripting languages
(b) Client side scripts are executed on the server and the resulting page will be downloaded and interpreted by the browser
(c) Client-side scripts increase the network traffic on execution of the script
(d) Client-side scripts can perform many functions such as data validation and provide interactive feedback to the user
(e) Browsers need plug-ins to execute client-side scripts.

19. Consider the following entries in a Cascading Style Sheet (CSS) file.

P {colour: blue; background-colour: white; border-colour: red; border-left: solid} 
BODY {colour: black; border-colour: green} 

What is the colour of text in a paragraph of an HTML document that uses the above style sheet?

(a) green 
(b) blue 
(c) black 
(d) red 
(e) White.

20. Which property does one use to align text to the right side of a block-level element in Cascading Style Sheets?

(a) horizontal-align 
(b) align 
(c) block-align 
(d) justify 
(e) text-align.

Answers

       Answer    Reason
11. D Because book[1] prints 2 and book[10] prints 10

12. A Because cookies are not programs.

13. B 125/5 is 25 and 25%12 is 1(Remainder)

14. B All the other options are wrong and incorrect for the question asked.

15. C All the other options are wrong and incorrect for the question asked.

16. B Promt( ) is used to get input text from the user.

17. A All the other options are wrong and incorrect for the question asked.

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

19. B Because for applying styles to text of a paragraph P is used in CSS. And hence the text is printed in Blue color.

20. E According to the CSS syntax for text alignment.



5 comments :