Web-Technologies
Question 1 |
Consider the following XML DTD describing course information in a university:
<!ELEMENT Univ (Course+, Prof+)> <!ELEMENT Course (Title, Eval*)> <!ATTLIST Course Number ID #REQUIRED Instructor IDREF #IMPLIED> <!ELEMENT Title (#PCDATA)> <!ELEMENT Eval (#PCDATA)> <!ATTLIST Eval Score CDATA #REQUIRED> <!ELEMENT Prof EMPTY> <!ATTLIST Prof Name ID #REQUIRED Teaches IDREF #IMPLIED>
What is returned by the following XQuery?
let $as := //@Score for $c in /Univ/Course[Eval] let $cs := $c/Eval?@Score where min($cs) > avg($as) return $c
A | The professor with the lowest course evaluation |
B | Professors who have all their course evaluations above the university average |
C | The course with the lowest evaluation |
D | Courses with all evaluations above the university average |
Question 2 |
Given below are HTML lines,
With reference to the HTML lines given above, consider the following statements.
(i) Clicking on the point <80, 75> does not have any effect.
(ii) The web browser can identify the area applicable to the mouse-click within the image and the subsequent action to be taken without additional responses from the web server.
(iii) The dots in the cgi-bin URL will be resolved by the web browser before it is sent to the web server.
(iv) The "fd.html" request when sent to the web server will result in a GET request.
Exactly how many of the statements given above are correct?
A | 0 |
B | 1 |
C | 2 |
D | 3 |
Question 3 |
Consider the XML document fragment given below:
Consider the XPath expression: *[not (self)::TOC]
What would be the result of the given XPath expression when the current node is Book?
A | The Title and Content elements |
B | The Content and TOC elements |
C | The Title and TOC elements |
D | The Title, Content and TOC elements
|
Question 4 |
Which of the following is TRUE only of XML but NOT HTML?
A | It is derived from SGML |
B | It describes content and layout |
C | It allows user defined tags |
D | It is restricted only to be used with web browsers |
Question 5 |
A | <a.href: “http://www.yourname.com/”, href: “...var.html”> |
B | <base href: “http://www.yourname.com/”> |
C | <a.href: “http://www.yourname.com/”> |
D | <base href: “http://www.yourname.com/”, range: “...var.html”> |
Question 6 |
1. XML overcomes the limitations in HTML to support a structured way of organizing content.
2. XML specification is not case sensitive while HTML specification is case sensitive.
3. XML supports user defined tags while HTML uses pre-defined tags.
4. XML tags need not be closed while HTML tags must be closed.
A | 2 only |
B | 1 only |
C | 2 and 4 only |
D | 3 and 4 only |
Question 7 |
Consider the HTML table definition given below:
The number of rows in each column and the number of columns in each row are:
A | 〈2, 2, 3〉 and 〈2, 3, 2〉 |
B | 〈2, 2, 3〉 and 〈2, 2, 3〉 |
C | 〈2, 3, 2〉 and 〈2, 3, 2〉 |
D | 〈2, 3, 2〉 and 〈2, 2, 3〉 |
Question 8 |
HTML (Hyper Text Markup Language) has language elements which permit certain actions other than describing the structure of the web document. Which one of the following actions is NOT supported by pure HTML (without any server or client side scripting) pages?
A | Embed web objects from different sites into the same page |
B | Refresh the page automatically after a specified interval |
C | Automatically redirect to another page upon download |
D | Display the client time as part of the page |
Question 9 |
A graphical HTML browser resident at a network client machine Q accesses a static HTML webpage from a HTTP server S. The static HTML page has exactly one static embedded image which is also at S. Assuming no caching, which one of the following is correct about the HTML webpage loading (including the embedded image)?
A | Q needs to send at least 2 HTTP requests to S, each necessarily in a separate TCP connection to server S |
B | Q needs to send at least 2 HTTP requests to S, but a single TCP connection to server S is sufficient |
C | A single HTTP request from Q to S is sufficient, and a single TCP connection between Q and S is necessary for this |
D | A single HTTP request from Q to S is sufficient, and this is possible without any TCP connection between Q and S |
Whenever a browser opens a webpage, a separate HTML request must be sent for each image or component in HTML like css file or javascript. But all can be done in the same TCP connection.
Question 10 |
A | UTF-16 |
B | UTF-32 |
C | UTF-8 |
D | ISO-8859-1 |
This has not always been the case. The character encoding for the early web was ASCII.
Question 11 |
A | wrap |
B | push |
C | float |
D | align |
Question 12 |
A | Header |
B | Sidebar |
C | Article |
D | Footer |
Question 13 |
A | JSP Directives |
B | JSP Scriptlets |
C | JSP Actions |
D | JSP Reaction |
Question 14 |
A | margin |
B | clear |
C | float |
D | padding |
Syntax: clear: none|left|right|both|initial|inherit;
Question 15 |
A | Internal |
B | Inline |
C | Outline |
D | External |
Inline - by using the style attribute inside HTML elements
Internal - by using a < style > element in the < head > section
External - by using a < link > element to link to an external CSS file
The most common way to add CSS, is to keep the styles in external CSS files.
Question 16 |
A | Receiver |
B | Controller |
C | Transmitter |
D | Modulator |
Question 17 |
A | Content-Type: text/event-stream |
B | Content-Type: text/ application-stream |
C | Content-Type: text/data-stream |
D | None of the options |
Question 18 |
A | Add-ons |
B | Plug-ins |
C | Utilities |
D | Widgets |
Question 19 |
A | section |
B | class |
C | article |
D | none of the options |
Question 20 |
A | nav |
B | footer |
C | section |
D | navigation tag |
Notice that NOT all links of a document should be inside a < nav > element. The < nav > element is intended only for major blocks of navigation links.
Browsers, such as screen readers for disabled users, can use this element to determine whether to omit the initial rendering of this content.
Question 21 |
A | < ?- -- > |
B | < !-- --! > |
C | < !-- -- > |
D | < /-- -- > |
< !-- This is a comment -->
Question 22 |
A | It cannot be compared or sorted. This means an XML data type cannot be used in a GROUP BY statement. |
B | It cannot be used as a key column in an index. |
C | The value() method of the XML data type returns a scalar value, so it can be specified anywhere where scalar values are allowed.
|
D | All of the options. |
Note the following general limitations that apply to the xml data type:
The stored representation of xml data type instances cannot exceed 2 GB.
It cannot be used as a subtype of a sql_variant instance.
It does not support casting or converting to either text or ntext. Use varchar(max) or nvarchar(max) instead.
It cannot be compared or sorted. This means an xml data type cannot be used in a GROUP BY statement.
It cannot be used as a parameter to any scalar, built-in functions other than ISNULL, COALESCE, and DATALENGTH.
It cannot be used as a key column in an index. However, it can be included as data in a clustered index or explicitly added to a nonclustered index by using the INCLUDE keyword when the nonclustered index is created.
XML elements can be nested up to 128 levels.
Question 23 |
A | priceless instruction |
B | processing instruction |
C | polymorphic inheritance |
D | primary instruction |
Processing instructions are exposed in the Document Object Model as Node.PROCESSING_INSTRUCTION_NODE, and they can be used in XPath and XQuery with the 'processing-instruction()' command.
Question 24 |
A | defining a path between two nodes in an image |
B | defining clickable region in an image
|
C | highlighting an area in an image |
D | defining the site-map of a web-site |
Question 25 |
A | (A) and (B) only |
B | (A) and (C) only |
C | (B) and (C) only |
D | (A), (B) and (C) |
-HTML was designed to display data - with focus on how data looks
→ FALSE: HTML is a set of tags designed to tell browsers how to display text and images in a web page.
→ TRUE
Question 26 |
(a)Javascripts syntax is loosely based on Java’s syntax
(b)Javascript is stripped down version of Java
(c)Java and Javascript are originated from the Island of Java
A | (a) only |
B | (a), (b) and (c) |
C | (a) and (b) |
D | (a) and (c) |
→ Java can used to create the application independently.
→ JavaScript is used along with HTML mainly meant for validation.
Question 27 |
(a)XML uses DTD to describe the data
(b)XML uses XSL to describe the data
(c)XML uses a description node to describe the data
A | (a) only |
B | (b) only |
C | (a) and (b) |
D | (a) and (c) |
Option(B): XSLT (eXtensible Stylesheet Language Transformations) is the recommended style sheet language for XML.XSLT is far more sophisticated than CSS. With XSLT you can add/remove elements and attributes to or from the output file. You can also rearrange and sort elements, perform tests and make decisions about which elements to hide and display, and a lot more. XSLT uses XPath to find information in an XML document.
Hence here XML is not using XSL to describe the data. So statement (b) is wrong.
Option(C): Everything in an XML document is a node:
The entire document is a document node
Every XML element is an element node
The text in the XML elements are text nodes
Every attribute is an attribute node
Comments are comment nodes
Hence statement (c) is correct.
Question 28 |
A | < SCRIPT > |
B | < BODY > |
C | < HEAD >
|
D | < TITLE > |

Question 29 |
A | pass |
B | fail |
C | 80 |
D | Error at line 6 |
Question 30 |
A | VBScript |
B | ASP, NET |
C | JSP |
D | None of the given options |
Question 31 |
A | The destroy 0 method is called only once at the end of the life cycle of a servlet. |
B | The destroy 0 method is called after the servlet has executed service method. |
C | The destroy 0 method is called only once at the end of the life cycle of a servlet. And destroy 0 method is called after the servlet has executed service method. |
D | None of the given options
|
Question 32 |
A | document need to be well-formed |
B | document need to be validated against a DTD
|
C | document need to be well-formed and document need to be validated against a DTD |
D | document should contain valid data |
Question 33 |
A | < xml-stylesheet type=”text/xsl” href=”cdxsl” > |
B | < xml-stylesheet type=”text/xsl” xsl=’cd.xsl” > |
C | < ’/xml-stylesheet type=”text/dsl” href=”cd.xsl”? > |
D | < ?xml-styleshet type=”test/xsl” xsl=”cd.xsl”? >
|
Question 34 |
What is the difference between XML and HTML?
A | HTML is used for exchanging data, XML is not |
B | XML is used for exchanging data, HTML is not |
C | HTML can have user defined tags, XML cannot
|
D | XML is used for exchanging data, HTML is not (and) HTML can have user defined tags, XML cannot
|
XML is a meta-language, meaning it defines the structure of data, while HTML is a presentation language, meaning it defines how data is displayed. XML is used to store and transport data, while HTML is used to create web pages.
Question 35 |
What are tags used for?
A | To replace paragraph i.e., p tags
|
B | To logically divide the paragraphs |
C | To logically divide the document
|
D | To provide space between tables
|
Question 36 |
What are meta tags used for?
A | To store information usually relevant to browsers and search engines
|
B | To only store information usually relevant to browsers
|
C | To only store information about search engines
|
D | To store information about external links
|
Question 37 |
Which is true to change the text colour to red?
A | < BODY BGCOLOUR=RED > |
B | < BODY TEXT=RED > |
C | < BODY COLOUR=RED > |
D | None of the given options
|
Question 38 |
Which tag is used to display the numbered list?
A | < OL > < /OL > |
B | < DL > < /DL >
|
C | < UL > < /UL > |
D | < LI > < /LI > |
Question 39 |
The most popular way to materialize XML document is to use
A | DTD
|
B | XSLT
|
C | HTML |
D | SOAP |
Question 40 |
Apache Tomcat is a
A | Servlet
|
B | Java program
|
C | web server
|
D | web server that is capable of running Java programs
|
Question 41 |
In Javascript, what does in NaN function do?
A | Return true, if the argument is not a number
|
B | Return false, if the argument is not a number
|
C | Return true, if the argument is a number
|
D | None of the given options
|
Question 42 |
A. The number of tags decreases and users can define their own tags.
B. It is used for Presentation.
C. It is case sensitive.
D. It is dynamic.
Which of the above statements are true ?
A | B, C, D only |
B | A, B, D only |
C | A, C, D only |
D | B, D only
|
Question 43 |
List-I
(A) HTML
(B) DHTML
(C) XML
(D) JAVA
List-II
Choose the correct answer from the options given below:
A | (A)-(I), (B)-(III), (C)-(IV), (D)-(II) |
B | (A)-(II), (B)-(I), (C)-(IV), (D)-(III) |
C | (A)-(II), (B)-(I), (C)-(III), (D)-(IV) |
D | (A)-(III), (B)-(IV), (C)-(II), (D)-(I)
|
Question 44 |
A | When a user quits a browser |
B | When the user logs out and is invalidated by the servlet |
C | When the session is timed out due to inactivity |
D | When the user refreshes the browser and there is a persistent cookie |
Question 45 |
A | root |
B | header |
C | schema |
D | namespace |
Question 46 |
A | Association |
B | Visualization |
C | Correlation |
D | Segmentation |
→ This rule-based approach also generates new rules as it analyzes more data. The ultimate goal, assuming a large enough dataset, is to help a machine mimic the human brain’s feature extraction and abstract association capabilities from new uncategorized data.
Question 47 |
A | Dim stdno=100 |
B | Dim stdno=100 As Integer |
C | Dim stdno As Integer=100 |
D | Dim stdno As Integer(100) |
→Dim quantity As Integer = 10
Dim message As String = "Just started"
Question 48 |
A | Load |
B | Display |
C | Visible |
D | Show |
Syntax: [ object ].Show modal
The Show method syntax has these parts:

Question 49 |
A | Session.Exit |
B | Session.End |
C | Session.Abandon |
D | Session.terminate |
→Abandon - removes all the objects stored in a Session. If you do not call the Abandon method explicitly, the server removes these objects and destroys the session when the session times out.It also raises events like Session_End.
Question 50 |
A | A character |
B | A word |
C | A line of text |
D | Full paragraph |
→The
- (defines a description list) and
- (defines terms/names).
→Inside a - tag you can put paragraphs, line breaks, images, links, lists, etc.
