Computer Knowledge
Markup and Web Languages
1,701 Questions
Test your understanding of HTML tags, XML structures, and web page creation technologies. The questions cover elements like CSS styling, parsing documents, and defining web attributes. This section is essential for candidates appearing for computer proficiency tests in various competitive exams.
HTML tags and attributesXML document parsingCSS styling levelsWeb page creation basicsBrowser compatibility
Markup and Web Languages Questions
-
AirthmaticFormat
-
CurrencyFormat
-
NumberFormat ==
-
StringBuffer
C
Correct answer
Explanation
NumberFormat is the correct class for displaying currency/money formats in JSP pages. While the option text has formatting issues (extra '==' characters), NumberFormat.getCurrencyInstance() is the standard way to format monetary values. ArithmeticFormat is misspelled, and CurrencyFormat/StringBuffer are not used for this purpose.
-
It defines the standard tag that works the same everywhere
-
It is a single library and we can use it in multiple jsp containers
-
It has support for the common structural tasks like iteration and condition
-
All of the above
D
Correct answer
Explanation
JSP tag libraries provide standardized tags that work consistently across containers, can be reused across multiple JSP containers, and include support for common structural patterns like iteration and conditional logic. This makes 'All of the above' the correct answer as all individual statements are true.
-
<%= expressions %>
-
<% code fragment %
-
<%! Declarations %>
-
<%-- comment -- %>
B
Correct answer
Explanation
The scriptlet tag <% code fragment %> contains Java code fragments that are executed during page generation. This is different from expressions (<%= %>) which evaluate and print, declarations (<%! %>) which declare class members, and comments (<%-- -- %>) which are ignored. Note: the option has a typo (missing '>' in closing tag).
-
readOnly==
-
dynamic
-
static==
-
None of the above
C
Correct answer
Explanation
The <%@ include file='...' %> directive performs a STATIC include - the file content is inserted into the JSP page at translation/compile time, becoming part of the generated servlet. This is different from the action which includes content dynamically at request time. Note: option text has formatting issues with '==' characters.
-
None of the above
-
location
-
exception-type
-
error-page
D
Correct answer
Explanation
In the web application deployment descriptor (web.xml), the `` tag is used to define custom error pages for specific HTTP status codes or Java exception types. The other options are nested elements or incorrect.
-
<% code fragment %>
-
<%= expressions %>
-
<%! Declarations %>
-
<%-- comment -- %>
D
Correct answer
Explanation
The <%-- comment -- %> syntax is used for JSP comments, which are ignored by the JSP container and not sent to the client browser. This is different from HTML comments () which are visible in the page source, and other JSP scripting elements (<% %>, <%= %>, <%! %>).
A
Correct answer
Explanation
The jsp:plugin action tag is specifically designed to generate browser-appropriate HTML tags (such as OBJECT and EMBED) to run Java Applets or JavaBeans in a client browser.
-
It offers option of sharing local variables and better run time efficiency
-
Can be used to incorporate contents from static documents
-
Provides benefit of automatic recompilation
-
Can include dynamically generated output
B,C
Correct answer
Explanation
The JSP include directive (<%@ include %>) incorporates static documents into JSPs at translation time, merging content before compilation. When the included file changes, the JSP automatically recompiles. However, it cannot handle dynamically generated output - dynamic inclusion requires jsp:include action. Local variables cannot be shared through the directive.
-
At least one <servlet> element must be present.
-
<welcome-file> is a child element of <welcome-file-list>.
-
<web-application> is the root element
-
<servlet> elements must all be declared before <servlet-mapping> elements.
-
At least one element must be present.
B,E
Correct answer
Explanation
In Java web.xml deployment descriptors: (A) is false - servlet elements are optional. (B) is true - is a child of . (C) is false - the root element is , not . (D) is false - servlet and servlet-mapping elements can be in any order. (E) is true - at least one element must be present. The correct answers are B and E.
-
WSDL
-
XML schema organisation
-
W3C
-
XML consortium
C
Correct answer
Explanation
XML is standardized by the World Wide Web Consortium (W3C). WSDL is a description language for web services, and there is no "XML schema organisation" or "XML consortium" that serves as the official standards body.
C
Correct answer
Explanation
XAML (eXtensible Application Markup Language) is the declarative markup language used in WPF (Windows Presentation Foundation) for defining user interfaces and visual elements. It's analogous to HTML in web development.
-
eXtensive Markup Language
-
eXtensive Markup List
-
eXtension Markup List
-
eXtensible Markup Language
D
Correct answer
Explanation
XML stands for eXtensible Markup Language. It was designed to store and transport data in a structured, human-readable format. The 'extensible' means users can define their own tags and document structure, unlike HTML which has predefined tags. Options A, B, and C are incorrect expansions.
-
As a string called xml
-
As an object called xml
-
As a string called node
-
As an object called node
A
Correct answer
Explanation
In webMethods Integration Server, when an HTML form is submitted via POST, the server's content handler parses the form fields into the pipeline. A field named 'xml' is treated as a standard input parameter and appears in the pipeline as a String variable with the same name. It is not automatically converted to a node object unless specific XML parsing services are invoked.
A
Correct answer
Explanation
Both and support runtime expressions in their attribute values. You can use <%= %> syntax to dynamically set the property name or value, as shown in the example where value="<%= strFirst %>" sets the property to a variable's value.
-
Hyperlinks and Text Markup Language
-
Hyper Text Markup Language
-
Hyper Text Markinup Language
-
All of the above
B
Correct answer
Explanation
HTML stands for HyperText Markup Language, which is the standard markup language for creating web pages. HyperText refers to links that connect web pages, and Markup Language means it uses tags to define elements. Option A swaps 'Text' with 'and Text', and option C misspells 'Markup' as 'Markinup'.