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

Multiple choice technology web technology
  1. “from”

  2. “to”

  3. “fwd”

  4. “rev”

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The "fwd" element in WS-Routing's "path" header specifies the forward message path - the route the message takes through intermediaries to reach its ultimate receiver. This complements "rev" which handles the reverse path for responses.

Multiple choice technology web technology
  1. <soapenv:mustUnderstand >

  2. <soap:Body>

  3. <soap:Envelope>

  4. <soapenv:Envelope>

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The mustUnderstand attribute is a critical SOAP feature that ensures headers requiring specific processing are handled correctly. When set to "1" or "true", the recipient MUST process that header or return a with a MustUnderstand fault code indicating it cannot process the message.

Multiple choice technology web technology
  1. <soapenv:Body>

  2. <soapenv:Header>

  3. <soapenv:Head>

  4. <soapenv:Tail>

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In RPC-style SOAP usage, the element contains the method invocation data - the method name and its parameters. The (not ) carries metadata, and there is no element in the SOAP specification. The Body is where RPC-style messages place their actual call/return data.

Multiple choice technology web technology
  1. Objects should be serialized.

  2. Structures should be serialized.

  3. Arrays should be serialized.

  4. Object graphs should be serialized.

  5. All of the above.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

SOAP Section 5 encoding rules (now largely superseded by literal encoding and XSD) define a comprehensive serialization approach covering: simple types, structs (complex types), arrays, and object graphs with references. The rules provide a complete framework for representing data structures in XML format.

Multiple choice technology web technology
  1. XML documents

  2. Objects and structures

  3. Both

  4. None of the Above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In literal format (the modern WS-I compliant approach), the client and service exchange data as plain XML documents that conform to an XML Schema. This contrasts with encoded format where data is represented using SOAP's serialization rules (Section 5) as objects/structures. Literal format treats the XML as the actual data contract.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

XML element names must follow specific naming rules: they can contain letters, digits, hyphens, underscores, and periods; must start with a letter or underscore; cannot contain spaces; and cannot begin with 'xml' in any case combination. These rules ensure XML parsers can reliably process documents.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

There's a distinction between 'well-formed' XML (correct syntax) and 'valid' XML (well-formed + conforms to DTD/schema). A document can be well-formed without being validated against a DTD. Validating against a DTD makes it 'valid' XML, not just 'well-formed' - it must already be well-formed to even be validated.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

CSS can be applied to XML documents to control display, formatting, and presentation. This is commonly done by linking a stylesheet using the processing instruction. CSS styles XML elements by tag name, allowing XML data to be rendered visually in web browsers or other applications.

Multiple choice technology web technology
  1. error-page

  2. exception-type

  3. location

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In web.xml, the tag defines error page mappings for exception types or HTTP error codes. The exception-type and location are sub-elements within error-page tags, not standalone defining tags. The element wraps the complete error handling configuration.

Multiple choice technology programming languages
  1. tagname

  2. name

  3. tag

  4. prefix

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To solve this question, the user needs to know about JSP and the syntax for defining custom tags in JSP using a tag library descriptor file. Specifically, the user should be familiar with the elements used in the tag library descriptor file.

In this case, the JSP file is using a custom tag defined in a tag library descriptor file. The myTag element in the JSP file should be defined in the tag library descriptor file using the "name" attribute in the "tag" element.

Now, let's go through each option and determine which one is correct:

A. tagname: This is not a valid option for defining a custom tag in a tag library descriptor file.

B. name: This is the correct answer. The "name" attribute in the "tag" element is used to define the name of the custom tag being defined in the tag library descriptor file.

C. tag: The "tag" element is used to define a custom tag in the tag library descriptor file, but it does not specify the name of the tag.

D. prefix: The "prefix" attribute in the "taglib" element is used to specify the prefix used for the custom tag library in the JSP file, but it does not define the custom tag itself.

Therefore, the correct answer is:

The Answer is: B. name