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

Multiple choice technology web technology
  1. It's valid navigation rule

  2. It will generate RuntimeException due to lack of <from-outcome> tag

  3. page.jsp will never be displayed with this navigation rule

  4. It's not proper (although it's valid) navigation-rule. It should have <from-outcome> tag

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

The claimed answers are A and D. This navigation rule is technically valid XML (A is true), but it's incomplete because a navigation case should have a tag to specify when this navigation should occur (D is true). Option B is incorrect because it won't throw RuntimeException - it's syntactically valid. Option C is incorrect because page.jsp could be displayed as a default view or through other means.

Multiple choice technology web technology
  1. True

  2. False

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

In JSF, if `is omitted from a navigation rule, it defaults to wildcard matching (*), applying to all views. Therefore, both configurations define a global navigation rule that redirects to/page.jsp` whenever the outcome is 'outcome', making them identical in effect.

Multiple choice technology web technology
  1. <name>

  2. <icon>

  3. <view>

  4. <description>

  5. <case>

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

The JSF navigation-rule element only accepts specific nested elements: from-view-id, navigation-case, and redirect. The name, icon, view, description, and case elements shown in options are NOT part of the navigation-rule schema. Options A (name), C (view), and E (case) correctly identify invalid elements.

Multiple choice technology web technology
  1. True

  2. False

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

Both approaches are equivalent. h:outputFormat is a convenience tag that internally uses f:convertDateTime for date formatting. Wrapping f:convertDateTime inside h:outputText achieves the same result, as the converter applies to the outputText value.

Multiple choice technology web technology
  1. True

  2. False

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

JSF allows multiple validators to be attached to a single component. You can nest multiple f:validator tags or use the validatorIds attribute with Validator interface implementations. All validators execute in sequence during the Process Validations phase.

Multiple choice technology web technology
  1. True

  2. False

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

Only ONE converter can be attached to a component. Converters are mutually exclusive - applying a second converter replaces the first. This is because a component can only have one single converted value; multiple converters would create ambiguity about which conversion logic to apply.

Multiple choice technology web technology
  1. True

  2. False

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

This code is invalid. While the taglib declarations and f:view wrapper are correct, h:commandButton must be inside a form element (h:form) to function. Command buttons require form context to handle action events and submission - this code lacks the required h:form wrapper.

Multiple choice technology programming languages
  1. True

  2. False

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

JSON is indeed a text format that is completely language independent. While JSON's syntax was derived from JavaScript, it's supported by virtually every modern programming language through parsers and generators. It was specifically designed to be a universal data interchange format that any language can read and write.

Multiple choice technology programming languages
  1. Superset of JavaScript

  2. Subset of Javascript

  3. Not related to Javascript

  4. Union of Java and Javascript

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

JSON (JavaScript Object Notation) is a lightweight text-based data format that is formally defined as a subset of the JavaScript programming language syntax. It is not a superset, nor is it unrelated to JavaScript, and it has no syntax union with Java.

Multiple choice technology web technology
  1. ActionForm

  2. Action

  3. All of the Above

  4. None of the Above

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

In Struts 2, HTML form parameters are automatically passed directly to Action classes via parameter interception. The Action class properties match form field names, and Struts 2 populates them automatically. ActionForm (used in Struts 1) is not required in Struts 2.

Multiple choice technology web technology
  1. SampleAction-validation.xml

  2. SampleClass-validation.xml

  3. All Of the above

  4. None of the above

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

In Struts 2, validation XML files are named after the Action class, not the action name specified in struts.xml. For an action with class SampleClass, the validation file must be named SampleClass-validation.xml. The framework looks for validation files based on the fully qualified class name.

Multiple choice technology web technology
  1. True

  2. False

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

In Struts 2, the configuration file name 'struts.xml' cannot be changed. The framework hardcodes this name and looks for it in the classpath. This is different from Struts 1, where you could specify a different config file name in web.xml. Struts 2 requires struts.xml to be in a specific location with that exact name.

Multiple choice technology testing
  1. XMLfile1.compare(XMLfile2)

  2. XMLcompare(file1,file2)

  3. compare(XMLfile1,XMLfile2)

  4. compare(file XML1,file XML2)

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

In QTP/UFT, the compare() method accepts two XML file objects as parameters and returns their differences. This is the standard syntax for XML comparison within the tool's testing framework.

Multiple choice technology programming languages
  1. Web System Description Language

  2. Web Service Description Language

  3. Web Service Definition Language

  4. Web System Definition Language

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

WSDL (Web Services Description Language) is an XML-based language for describing web services. It defines the service's location, available operations, input/output messages, and data types, enabling clients to understand how to interact with the web service.