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 programming languages
  1. tlib-version

  2. short-name

  3. uri

  4. display-name

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

To solve this question, the user needs to know the structure of the taglib descriptor file (also known as the TLD file) used in JavaServer Pages (JSP) applications.

The taglib element is used to define a tag library and contains several optional and required sub-elements. The question asks which of these sub-elements are required.

Now, let's go through each option and explain why it is right or wrong:

A. tlib-version: This sub-element specifies the version of the tag library descriptor file. It is an optional sub-element, not required.

B. short-name: This sub-element specifies a short name for the tag library. It is a required sub-element.

C. uri: This sub-element specifies the URI of the tag library and is used to identify the tag library in JSP pages. It is a required sub-element.

D. display-name: This sub-element specifies a display name for the tag library. It is an optional sub-element, not required.

Therefore, the correct answers are:

  • B. short-name
  • C. uri

The Answer is: B and C

Multiple choice technology programming languages
  1. name

  2. description

  3. validator

  4. tag-class

  5. display-name

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

In a JSP taglib descriptor file, each tag must have at minimum the 'name' element (how the tag is referenced in JSP pages) and the 'tag-class' element (the fully-qualified class name implementing the tag's functionality). Description, validator, and display-name are optional elements.

Multiple choice technology programming languages
  1. class-name

  2. tag

  3. class

  4. tag-class

  5. tei-class

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

The 'tag-class' element within the tag element specifies the fully-qualified name of the Java class that implements the tag's functionality. This is the required element that connects the XML tag definition to the actual executable code. 'class-name', 'class', and 'tei-class' are not valid elements in the taglib descriptor.

Multiple choice technology programming languages
  1. XPathDocument class is very fast, but it is read-only

  2. The XmlDocument class provides editable representation of XML document, but is comparatively slower.

  3. XPathNavigator object can be created using both XPathDocument and XmlDocument classes, which can be used to to select and navigate XML data.

  4. None of the above

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

All statements are true: XPathDocument is a fast, read-only cache; XmlDocument is editable but slower; and XPathNavigator can navigate both. Thus, 'None of the above' is the correct false statement.

Multiple choice technology web technology
  1. <%@ page type="image/svg" %>

  2. <%@ page mimeType="image/svg" %>

  3. <%@ page language="image/svg" %>

  4. <%@ page contentType="image/svg" %>

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

The correct JSP directive to set HTTP response content type is '<%@ page contentType="image/svg" %>'. The contentType attribute specifies the MIME type. Options A (type), B (mimeType), and C (language) are not valid attributes for setting response content type.

Multiple choice technology web technology
  1. a. The Soap Message Format

  2. b. How to send message and receive response

  3. c. Data Encoding

  4. d. A & B only

  5. e. All Of the above

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

The SOAP specification defines the XML envelope format, the data encoding rules, and the conventions for representing remote procedure calls and responses.

Multiple choice technology web technology
  1. True

  2. False

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

The SOAP Header is an optional element in a SOAP message. While the Envelope and Body are mandatory, the Header is used only when you need to convey additional information such as authentication, transaction context, or processing instructions. Many simple SOAP messages have no Header at all.

Multiple choice technology web technology
  1. True

  2. False

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

The SOAP Header element is specifically designed to convey optional, application-specific, and infrastructure-related information. Headers are used for metadata like authentication tokens, routing information, transaction contexts, or other processing directives that are separate from the main message payload in the Body.

Multiple choice technology web technology
  1. a. WSDL is a standard format for describing XML Webservices.

  2. b. WSDL defines XML based syntax for defining the functionality exposed by a web service.

  3. c. WSDL is useful for automating communications between Web Services.

  4. d. All of above

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

WSDL (Web Services Description Language) serves multiple purposes: it provides a standard XML format for describing web services (A), defines XML-based syntax for specifying web service functionality (B), and enables automation of web service communications (C). Since all three statements are correct, D is the right choice.

Multiple choice technology web technology
  1. a. RPC based format

  2. b. Document based format

  3. c. both a and b.

  4. d. They cannot be serialized.

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

SOAP messages can be serialized in two main styles: RPC (Remote Procedure Call) style, which models a traditional procedure call with parameters and return values, and Document style, which sends entire XML documents. The CHOICE between these is referred to as the 'use' or 'encoding style' in SOAP. The correct answer acknowledges both RPC and Document-based formatting are valid.

Multiple choice technology web technology
  1. SOAP is for HTTP only

  2. SOAP can be used in combination with any protocol that can carry a SOAP envelope

  3. All the above

  4. none of the above

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

SOAP is protocol-agnostic. While commonly used with HTTP, SOAP envelopes can be transported over any protocol that can carry XML/text - SMTP, JMS, TCP, etc. Option A incorrectly restricts SOAP to HTTP only.