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. a language for navigating in XML documents

  2. a language for transforming XML documents

  3. a language for formatting XML documents

  4. is a language for Parsing XML documents

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

XSLT (Extensible Stylesheet Language Transformations) is a declarative, XML-based language used for transforming XML documents into other formats, such as HTML, plain text, or other XML documents.

Multiple choice technology web technology
  1. a language for navigating in XML documents

  2. a language for transforming XML documents

  3. a language for formatting XML documents

  4. is a language for Parsing XML documents

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

XSLT (Extensible Stylesheet Language Transformations) is a language designed for transforming XML documents from one format to another. While it can be used for formatting and includes XPath for navigation, its primary purpose is transformation. XPath is specifically for navigation, not XSLT. Options A, C, and D describe other XML technologies or aspects of XSLT.

Multiple choice technology web technology
  1. create hyperlinks in XML documents

  2. allows the links point to specific parts of an XML document

  3. navigate through a XML document

  4. Query data from XML document

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

XPointer is an XML specification that allows hyperlinks to point to specific parts of an XML document, not just the whole document. While XLink is used for creating hyperlinks, and XPath/XQuery are for navigation and querying respectively, XPointer specifically enables addressing into the internal structures of an XML document.

Multiple choice technology web technology
  1. True

  2. False

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

WS-I (Web Services Interoperability) Organization explicitly prohibits RPC-encoded style in its Basic Profile. Document/literal (or simply literal) style is WS-I compliant. RPC-encoded style creates interoperability issues because it relies on SOAP encoding rules which may not be consistently implemented across different platforms.

Multiple choice technology web technology
  1. True

  2. False

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

XHTML is actually MORE strictly typed than HTML, not less. XHTML requires well-formed XML syntax with proper nesting, closing tags, and case-sensitivity. The statement claims XHTML is 'not strictly typed like HTML' which is false - HTML is more permissive, XHTML is stricter.

Multiple choice technology security
  1. Server side Validation

  2. Client side Validation

  3. None of the above

  4. Both 1 and 2

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

Client-side validation is executed in the user's browser and can be easily bypassed by disabling JavaScript, modifying the client-side code, or intercepting and altering HTTP requests.

Multiple choice technology security
  1. Server side Validation

  2. Client side Validation

  3. None of the above

  4. Both 1 and 2

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

Client-side validation can be easily bypassed by attackers using browser developer tools, disabling JavaScript, intercepting and modifying requests, or directly calling APIs. Server-side validation is essential for security as it cannot be bypassed by client-side manipulation.

Multiple choice technology testing
  1. Bitmap checkpoint

  2. Standard checkpoint

  3. Accessibility checkpoint

  4. XML checkpoint

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

To solve this question, the user needs to have knowledge about QTP and its various types of checkpoints. The user needs to know the purpose of each checkpoint and how they are used to test web pages.

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

A. Bitmap checkpoint: This checkpoint compares the bitmap of the actual and expected images, so it is used to verify the graphical elements of the web page. It is not used for verifying the web page with the W3C standard.

B. Standard checkpoint: This checkpoint verifies the property values of an object on a web page. It can be used to check the compliance of the web page with W3C standards, but it is not specifically designed for this purpose.

C. Accessibility checkpoint: This checkpoint is used to verify the accessibility of a web page for users with disabilities. It includes checking the compliance of the web page with W3C accessibility guidelines, which are related to W3C standards. So, this checkpoint is the correct option for verifying the web page with W3C standard.

D. XML checkpoint: This checkpoint verifies the content of an XML document. It is not used for verifying the web page with W3C standard.

The Answer is: C (Accessibility checkpoint)

Multiple choice technology testing
  1. Bitmap checkpoint

  2. Standard checkpoint

  3. Accessibility checkpoint

  4. XML checkpoint

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

The Accessibility checkpoint in QTP is designed to verify that a web page complies with W3C accessibility standards (WCAG). It checks for proper HTML structure, ALT text for images, and other accessibility guidelines. Bitmap checkpoints capture pixel-by-pixel appearance, Standard checkpoints verify object properties, and XML checkpoints validate XML structure.

Multiple choice technology programming languages
  1. 1) It is necessary to implement TagExtraInfo interface.

  2. 2) You have to insert into the tag element of the taglib descriptor file an entry for tei-class element.

  3. 3) The interface you have to implement has a method called getVariableInfo.

  4. 4) None of the above.

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

To create scripting variables for a custom tag, you must implement the TagExtraInfo interface and override its getVariableInfo() method. Additionally, you need to declare this implementation in the taglib descriptor file using the tei-class element under the tag element. This combination enables the JSP container to understand and manage the scripting variables exposed by your custom tag.

Multiple choice technology programming languages
  1. 1) web-resource-name

  2. 2) url-pattern

  3. 3) http-method

  4. 4) auth-constraint

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

The web-resource-collection element in web.xml requires web-resource-name (to identify the collection) and url-pattern (to specify which URLs are protected). The http-method element is optional - if omitted, it applies to all HTTP methods. The auth-constraint element is separate from web-resource-collection. Options A and B are correct.

Multiple choice technology programming languages
  1. 1) There is no such method.

  2. 2) It has two paramters: request and response

  3. 3) It has one parameter of type String which is the relative URL of the page to include.

  4. 4) This method is appropiate to use within a Tag class.

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

PageContext.include(String relativeUrlPath) includes the specified resource and executes it. Option C correctly identifies this signature with a single String parameter. Option D is also correct because this method is available for use within Tag handler classes. Option B is wrong - there's no two-parameter version with just request and response. The method exists (unlike option A claims).

Multiple choice technology programming languages
  1. 1) yes

  2. 2) no

  3. 3) only the second part of the statement is true.

  4. 3) only the first part of the statement is true.

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

In JSP custom tags, the getParent() method of a Tag handler returns its parent tag. For top-level tags, it returns null, and for nested tags, it returns the innermost enclosing tag handler instance.

Multiple choice technology programming languages
  1. 1) It only contains the element role-name (besides element description)

  2. 2) Only the role-name specified in security-role-ref can be used

  3. 3) It is a subelement of web-resource-collection

  4. 4) It is related to authentication

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

The auth-constraint element in web.xml specifies which roles are authorized to access protected resources. It contains role-name elements (plus optional description). Option A is correct. Option B is wrong because auth-constraint uses actual role names, not just those in security-role-ref. Option C is incorrect because auth-constraint is a subelement of security-constraint, not web-resource-collection. Option D is misleading - it's about authorization (who can access), not authentication (verifying identity).

Multiple choice technology web technology
  1. True

  2. False

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

An HTML page is not itself a web component. Web components are custom, reusable HTML elements with encapsulated functionality (custom elements, shadow DOM, HTML templates). A regular HTML page may contain web components, but the page itself is a document, not a component.