Web-Technologies
Question 1 |
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 2 |
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 3 |
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 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 |
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 6 |
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 7 |
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 8 |
A | XSL document |
B | XML document |
C | XHTML document |
D | XQuery document |
1. XPath stands for XML Path Language
2. XPath uses “path like” syntax to identify and navigate nodes in an XML document
3. XPath contains over 200 built-in functions
4. XPath is a major element in the XSLT standard

Question 9 |
A | < dl > |
B | < ul > |
C | < li > |
D | < ol > |
- tag defines an ordered list. An ordered list can be numerical or alphabetical.
- tag to create unordered lists.
→ The
- tag defines an unordered (bulleted) list. Use the
- tag together with the
Question 10 |
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 |
→ SGML stands for Standard Generalized Markup Language and it was extended to HTML and XML.
→ Both XML and HTML are used to describe the content and layout of a webpage and are used with web browsers only.
Question 11 |
The definitions in an XML document are said to be when the tagging system and definitions in the DTD are all in compliance.
A | well-formed |
B | reasonable |
C | valid |
D | logical |
→ But when when associate a well formed XML document with a DTD( in which we define the structure of a document) and if that XML document validates all the definitions defined in DTD then that XML document is called as “valid” XML document.
→ Always remember that a “valid” XML document is also a “well-formed” XML document but a “well-formed” XML document is not necessarily a “valid” XML document.
→ In question, it is mentioned that XML document is validating the definitions in the DTD. So, the answer is option (3).
Question 12 |
Consider the JavaScript Code :
var y = "12"; function f() { var y = "6"; alert (this.y); function g() { alert (y); } g(); } f();
If M is the number of alert dialog boxes generated by this JavaScript code and D1, D2, …., DM represents the content displayed in each of the M dialog boxes, then :
A | M=3; D1 displays ”12”; D2 displays ”6”; D3 displays ”12”.
|
B | M=3; D1 displays ”6”; D2 displays ”12”; D3 displays ”6”. |
C | M=2; D1 displays ”6”; D2 displays ”12”. |
D | M=2; D1 displays ”12”; D2 displays ”6”.
|
It has different values depending on where it is used:
• In a method, this refers to the owner object.
• Alone, this refers to the global object.
• In a function, this refers to the global object.
• In an event, this refers to the element that received the event.
• Methods like call(), and apply() can refer this to any object.
• There are two alert boxes in the javascript code. So two messages will be displayed.
• First message, alert(this.y) here this.y is global variable whose value is 12. So first message is “12”.
• Second message is alert(y) , here “y” local variable and value is 6 so second message displays value “6”
Question 13 |
A | OAK |
B | D |
C | Netbean |
D | Eclipse |
Question 14 |
A | Java |
B | C |
C | Assembly |
D | Fortran |
Question 15 |
A | Servlet |
B | JSP |
C | Both (A) & (B) |
D | None of the above |
● The jsp pages are easier to maintain than servlet because we can separate designing and development. It provides some additional features such as Expression Language, Custom Tag etc
Question 16 |

A | P-1,Q-2,R-3,S-4 |
B | P-3,Q-4,R-2,S-1 |
C | P-3,Q-1,R-4,S-2 |
D | P-4,Q-3,R-2,S-1 |
Interoperability is a characteristic of a product or system, whose interfaces are completely understood, to work with other products or systems, at present or in the future, in either implementation or access, without any restrictions.
Service-oriented computing (SOC) is the computing paradigm that utilizes services as fundamental elements for developing applications/solutions.
To build the service model, SOC relies on the service oriented architecture (SOA), which is a way of reorganizing software applications and infrastructure into a set of interacting services

Question 17 |
A | jscript.write (“Hi There”); |
B | document.write (“Hi There”); |
C | print (“Hi There”); |
D | print.jscript (“Hi There”); |
Writing into an HTML element, using innerHTML.
Writing into the HTML output using document.write().
Writing into an alert box, using window.alert().
Writing into the browser console, using console.log().
Question 18 |
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 19 |

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 20 |
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 |
● Both XML and HTML consists of Tags. Every open tag should consists of close tag in both languages.
Question 21 |
A | h1 { background-color :#FFFFFF} |
B | { background-color :#FFFFFF} . h1 |
C | h1 { background-color :#FFFFFF} . h1(all) |
D | h1. all{bgcolor= #FFFFFF} |
elements AND all
elements:
Example:
h1, p { background-color: yellow; }
→ To style several elements with the same style, separate each element name with a comma.
Question 22 |
A | < ?xml version='1.0'/ > |
B | < *xml version='1.0'/ > |
C | < ?xml version="1.0"/ > |
D | < /xml version='1.0'/ > |
2.XML was designed to store and transport data.
3.XML was designed to be both human- and machine-readable.
Syntax: < ?xml version="1.0"/ >
Question 23 |
Which of the following statements is/are FALSE?
- (i) XML element names are case sensitive
(ii) In XML, empty element can be represented as
(iii) XML element names can contain spaces
A | only (iii) |
B | only (ii) and (iii)
|
C | only (i) and (iii)
|
D | only (ii)
|
1. text
2. attributes
3. other elements or a mix of the above
Note: XML element names cannot contain spaces.
Question 24 |
XML documents form a ___ structure.
A | Binary tree
|
B | Tree
|
C | Linear list |
D | Graph |
→ This specification does not specify how the document entity is to be located by an XML processor; unlike other entities, the document entity has no name and might well appear on a processor input stream without any identification at all.
Question 25 |
A | Namespaces
|
B | DTD |
C | CSS |
D | DOM
|

Question 26 |
A | well-formed |
B | reasonable |
C | valid |
D | logical |
→ But when when associate a well formed XML document with a DTD( in which we define the structure of a document) and if that XML document validates all the definitions defined in DTD then that XML document is called as “valid” XML document.
→ Always remember that a “valid” XML document is also a “well-formed” XML document but a “well-formed” XML document is not necessarily a “valid” XML document
→ In question, it is mentioned that XML document is validating the definitions in the DTD. so the answer is option (3).
Question 27 |
A | Hypertext |
B | hypermedia |
C | Both (A) and (B) |
D | Anchoring |
Question 28 |
Which of the following is the correct syntax to insert an image in HTML documents?
A | < a href=”flower.jpg”? >
|
B | < image href=”flower.jpg” width=”500” height=”600” > |
C | < img src=”flower.jpg” >
|
D | < img href=”flower.jpg” >
|
→ The < img > tag is empty, it contains attributes only, and does not have a closing tag.
→ The src attribute specifies the URL (web address) of the image: < img src=”url” >
Question 29 |
How many different headings tags are available in HTML?
A | 6 |
B | 8 |
C | 3 |
D | 5 |
→ A heading element implies all the font changes, paragraph breaks before and after, and any white space necessary to render the heading.
→ The heading elements are H1, H2, H3, H4, H5, and H6 with H1 being the highest (or most important) level and H6 the least.
Question 30 |
A | The time value should be assigned without double quotes(“). |
B | The time value should be enclosed within double quotes(“). |
C | The time value should be enclosed within single quotes(‘);
|
D | The time value should be enclosed within hash symbols(#). |
→The String values should be enclosed within double quotes(“)
→Date and Time variables should be enclosed within hash symbol(#)
Question 31 |
(a) <A href=”http://w3c.org/test.html” >
(b) <A href=”/HTML/test.html”> Test </A >
(c) <A href=”test.html”>Test < /A >
(d) <A href=”test.html#top”>Test < /A >
Which of the above are valid?
A | (a) and (b) only
|
B | (a),(b) and (c) only |
C | (b),(c) and (d) only |
D | (a),(b),(c) and(d) |
II. Statement 2 relative URL starting from website root
III. Statement 3 relative URL starting from the current page location
IV. Statement 4 relative URL starting from the current page location and then going to “test” part of the loaded page
Hence option C is right answer.
Question 32 |
A | window.reload() |
B | location.reload() |
C | window.refresh() |
D | page.refresh() |
→ location.reload();
→ The reload() method is used to reload the current document.
→ The reload() method does the same as the reload button in your browser.
→ By default, the reload() method reloads the page from the cache
Question 33 |
A | Hypertext |
B | hypermedia |
C | Both (A) and (B) |
D | Anchoring |
Question 34 |
A | ALTERNATE |
B | ALTLINK |
C | ALT_TEXT |
D | ALT |
● The syntax is
< img src=”file.jpg” alt=”Image can’t be loaded” >
Question 35 |
A | Linking one part of the document on one computer, to another part of the document on some other computer with the same file name |
B | Linking one part of the document on one computer, to another part of the document on some other computer in the same LAN |
C | Linking one part of the document to another part of the same document |
D | Linking one part of the document to another document on the same computer |
Question 36 |
A | Convert XML content into HTML content |
B | Convert XML content into DHTML content |
C | Convert XML content into XML DOM content |
D | Convert XML content into binary code |
Question 37 |
A | < ?xml version=”1.0” > |
B | < !-xml version=”1.0” > |
C | < /xml version=”1.0” > |
D | < \xml version=”1.0” > |
< ?xml
version = “version_number”
encoding = “encoding_declaration”
standalone = “standalone_status”
? >
Question 38 |
A | HTML |
B | BMP |
C | TIFF |
D | GIF |
1. Graphical interchange format – GIF
For line art (such as one- or two-color logos), simple drawings, animations, and basically any image that has no gradients or blends. GIF is also the best format when you want to display an image with a transparent background.
2. J oint Photographic Experts Group – JPEG
JPEG is the best format for colorful, complex images (such as photographs); images containing gradients or color blends; and any other images with millions of colors.
3. Portable Network Graphics – PNG
PNG generally produces better-looking images with smaller file sizes than GIF for the same kinds of limited-color images. Really old browsers, such as IE 3, don’t support the PNG format, but most Web designers now choose this format over GIF because so few people use such old browser. Browsers as recent as IE6 don’t display transparent PNG files properly, which is unfortunate because PNG files tend to handle transparency better.
4. X-Bitmap/X-Pixelmap
X-Bitmaps are a common format on UNIX platforms, and are often found in older image and icon libraries. Here, a bit is used to represent each pixel of the graphics. Consequently, only black and white images are supported. Transparency is possible as in GIF since the white portion is treated as the color of the underlying background (making way for attractive designs). X-Pixel map is the colour equivalent of X-Bitmap. Here, 8 bits represent each pixel(256 colours). Obviously, both methods are very inefficient in terms of storage space required. It is quite uncommon outside the UNIX environment.
Question 39 |
A | Var |
B | Dim |
C | S |
D | Set |
Syntax: Dim variable_name
Example: Dim anand
Question 40 |
A | JavaScript |
B | PHP |
C | HTML |
D | VBScript |
Question 41 |
A | prompt() |
B | alert() |
C | confirm() |
D | request() |
alert(): Displays an alert box with a message and an OK button
prompt(): Displays a dialog box that prompts the visitor for input
Question 42 |
A | < / xml version=’1.0’/ > |
B | < ? xml version=”1.0”/ > |
C | < *xml version=’1.0’/ > |
D | < ?xml version=*1.0*/ > |
→ The XML prolog is optional. If it exists, it must come first in the document.
→ XML documents can contain international characters, like Norwegian øæå or French êèé.
→ To avoid errors, you should specify the encoding used, or save your XML files as UTF-8.
→ UTF-8 is the default character encoding for XML documents.
Question 43 |
A | Document to Definition |
B | Document Type Definition |
C | Document Towards Definition |
D | Document Text Definition |
→ With a DTD, independent groups of people can agree on a standard DTD for interchanging data.
→ An application can use a DTD to verify that XML data is valid.
Question 44 |
A | < H1 > |
B | < HEAD > =large |
C | < HEADING >=large |
D | < H6 > |
→ < h1 > defines largest heading
→ < h6 > defines smallest heading.
Question 45 |
A | a mix of ASP.NET and HTML code |
B | all ASP.NET code |
C | all HTML code |
D | as much ASP.NET code as is in the ASP.NET file. |
Question 46 |
Which of the following is not an entity reference in XML?
A | &qt |
B | &
|
C | < |
D | >
|
They are introduced to avoid the ambiguity while using some symbols.
For example, an ambiguity is observed when less than ( < ) or greater than ( > ) symbol is used with the angle tag (<>).
Character entities are basically used to delimit tags in XML.
Following is a list of predefined character entities from XML specification. These can be used to express characters without ambiguity.
Ampersand − &
Single quote − ‘
Greater than − >
Less than − <
Double quote − ”
Question 47 |
____ element is used to create destination anchors in HTML?
A | < d > |
B | < a > |
C | < da > |
D | < ad > |
• This section introduces the link (or hyperlink, or Web link), the basic hypertext construct. A link is a connection from one Web resource to another. Although a simple concept, the link has been one of the primary forces driving the success of the Web.
• A link has two ends — called anchors — and a direction. The link starts at the “source” anchor and points to the “destination” anchor, which may be any Web resource (e.g., an image, a video clip, a sound bite, a program, an HTML document, an element within an HTML document, etc.)
Question 48 |
(i) A variable is created using the keyword
(ii) JavaScript is untyped language
Which of the above are true?
A | Neither (i) nor (ii) |
B | Only (i) |
C | Only(ii) |
D | Both (i) and (ii) |
(ii) False: Untyped means the operation of dividing integer by string would result in treating the first four bytes of strings as integer. This is because untyped take place directly on bits, there are no types to observe. Javascript is typed language.
Question 49 |
A | Secure |
B | hypertext |
C | linear |
D | non linear |
Question 50 |
A | < /—- > |
B | < ?—- > |
C | < !—- > |
D | < !—-! > |
Syntax: