Computer Knowledge
Markup and Web Languages
1,492 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
-
X-Query
-
XSLT
-
both A and B
-
MFL Transform
D
Correct answer
Explanation
MFL (Message Format Language) Transform in OSB is specifically designed for converting between XML and non-XML formats like binary files, COBOL copybooks, and fixed-length or delimited formats. XSLT and XQuery are transformation languages that only work with XML-to-XML conversions - they cannot handle non-XML formats. Therefore, MFL Transform is the correct resource for bidirectional XML to non-XML transformation.
-
XML Schema
-
WSDL
-
both A and B
-
None of the above
C
Correct answer
Explanation
Messages can be validated against both XML Schema (which defines the structure, data types, and constraints of XML messages) and WSDL (which contains schema definitions for web service operations). XML Schema provides structural validation while WSDL validates against the service contract. Both are valid validation mechanisms in SOA environments.
-
XSLT
-
Xquery
-
Any of the above
-
None of the above
B
Correct answer
Explanation
For large payload transformations in OSB, XQuery is generally preferred over XSLT due to better performance and memory efficiency. XSLT works well for smaller documents but can be resource-intensive for large payloads. XQuery is optimized for XML processing at scale.
B
Correct answer
Explanation
HTML is a markup language, not a programming language. Markup languages describe the structure and presentation of content (using tags like , ,
), while programming languages contain logic, algorithms, and computational instructions. HTML lacks programming constructs like loops, conditionals, and variables.
-
BODY & TAIL
-
HEAD & TAIL
-
HEAD & BODY
-
FIRST & BODY
C
Correct answer
Explanation
An HTML document is structured into two main sections: the HEAD section (contains meta-information, title, links to stylesheets/scripts) and the BODY section (contains the actual visible content displayed on the webpage). This is standard HTML document structure.
-
Script pages
-
Web pages
-
Application pages
-
HTML pages
B
Correct answer
Explanation
HTML documents are commonly referred to as web pages because they are the fundamental documents that make up the World Wide Web. While they are technically HTML documents, 'web page' is the standard term used in web development and general usage.
-
Definition
-
Messaage
-
Types
-
Port
A
Correct answer
Explanation
In WSDL, the element is the root element that contains all other WSDL elements. defines data structures, defines XML schema types, and defines specific endpoints.
B
Correct answer
Explanation
In a SOAP message structure, the Soap Body is a mandatory element containing the actual XML data sent to the service receiver. Only the Soap Header is optional.
-
header
-
body
-
fault element
-
end point url
A,B,C
Correct answer
Explanation
A SOAP message has an optional element for application-specific data, a mandatory element containing the actual message content, and can include a element for error information. Endpoint URLs are configured separately in WSDL.
-
Bindings
-
end Point
-
Service
-
Message
C
Correct answer
Explanation
In WSDL, the element contains one or more elements, each of which specifies the actual endpoint URL where the web service can be accessed. define protocol details and defines data structures.
-
xmlhttp.get("OPEN","samplePageUrl",true);
-
xmlhttp.open("GET","samplePageUrl",true);
-
xmlhttp.post("OPEN","samplePageUrl",true);
-
xmlhttp.open("POST","samplePageUrl",true);
B,D
Correct answer
Explanation
The correct XMLHttpRequest methods are open() with method as first parameter (case-sensitive: "GET" or "POST"), not get() or post(). Options B and D correctly use xmlhttp.open() with proper method names. Options A and C incorrectly use lowercase get()/post() methods and uppercase "OPEN"/"POST" as parameters.
A
Correct answer
Explanation
Struts 1.1 introduced validator framework integration, which allows developers to configure form validation rules declaratively using XML configuration files.
-
XML imposes important limitations on the receiving program or tool.
-
The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data.
-
XML tags offer an extra level of security.
-
XML tags specify to the receiving program or tool exactly how to format and display the data.
B
Correct answer
Explanation
XML uses custom, self-describing tags to define data structures. The receiving application parses these tags to interpret the data's semantic meaning and process it accordingly. XML does not specify visual formatting or provide built-in security features.
-
<servlet-class>
-
<taglib-url>
-
<security-constraint>
-
<init-param>
C
Correct answer
Explanation
The security-constraint tag in web.xml defines access rules for web resources, specifying URL patterns, HTTP methods, and authorized roles. This is the primary mechanism for declarative security in servlet applications. Option C correctly identifies this tag.
-
Add a TYPE=HIDDEN INPUT to the form
-
Trap the return keypress and return (null
-
Add 'return false' to onsubmit="..." in the FORM tag
-
Instruct the user not to press the Return key.
C
Correct answer
Explanation
The issue is that pressing Return in a text field within a form submits the form prematurely, before the user can click the processing button. The correct solution is to add 'return false' to the onsubmit handler in the FORM tag, which prevents the default form submission behavior. Option A (hidden input) doesn't address the issue. Option B (trapping return key) is incomplete. Option D (user instruction) is not a technical solution.