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
-
Converting an XML string to a XML schema tree, based on the XSD or DTD specified
-
Taking an instance of an XML schema element and transform it to a stream of bytes containing XML or an XML string
-
Both
-
None
A
Correct answer
Explanation
Parse XML activity converts an XML string into an XML schema tree structure based on a specified XSD or DTD. Option B describes the inverse operation (generating XML from a schema element tree), which is handled by Render XML or similar activities, not Parse XML.
-
Field is mandatory
-
Field is optional
-
Its an integer field
-
Its an XML reference element
B
Correct answer
Explanation
In TIBCO BusinessWorks configuration panels, a question mark (?) next to an input field indicates the field is optional - it can be left empty without causing validation errors. Mandatory fields are typically marked with an asterisk (*) or bold text, not a question mark.
-
The <head> section
-
Both the <head> section and the <body> section are correct
-
The <body> section
-
The <metadata> section
B
Correct answer
Explanation
JavaScript can be placed in either the or section of an HTML page, making option B correct. Scripts in the section execute before the page renders (useful for early initialization), while scripts in the section can manipulate DOM elements as they load. The choice depends on when the JavaScript needs to run and whether it needs to access specific DOM elements. Option D is incorrect because there is no standard section in HTML.
-
/This comment has more than one line/
-
<//This comment has more than one line//
-
<!--This comment has more than one line-->
-
//This is a comment
A,D
Correct answer
Explanation
JavaScript supports two types of comments: single-line comments starting with // and multi-line comments enclosed between /* and */. Option A demonstrates multi-line comment syntax, while option D shows single-line comment syntax. Option B uses incorrect angle brackets with the comment markers, and option C shows HTML-style comments which are not valid JavaScript comments.
-
No
-
Yes
-
always present
-
None of the above
A
Correct answer
Explanation
In tiles-defs.xml, the tag is the root element. XML documents have exactly one root element. Therefore, there can only be one tag at the top level. All individual tags must be nested within this single root tag.
-
yes
-
no
-
None of the above
-
It Depends.
A
Correct answer
Explanation
Within the root tag, you can have multiple tags. Each tag defines a separate tile definition. This is the standard way to define multiple tiles in a single tiles-defs.xml configuration file.
-
Input attribute
-
Name attribute
-
Page attribute
-
Path attribute
D
Correct answer
Explanation
In Struts configuration (struts-config.xml), each Action mapping is uniquely identified by its 'path' attribute. This path corresponds to the URL pattern that the ActionServlet uses to match incoming requests to specific Action classes. The name attribute is optional and used for logical naming, while input attribute specifies the input form page.
-
Always converts HTML markup to entity equivalents, like <
-
Never converts HTML markup to entity equivalents
-
Converts markup when filter=true
-
Converts markup when markup=false
C
Correct answer
Explanation
The tag has a 'filter' attribute that controls HTML escaping. When filter='true' (or filter is not specified, as true is default), the tag converts HTML markup characters like <, >, &, ' to their entity equivalents (<, >, &, ') to prevent XSS attacks. When filter='false', it outputs content as-is without conversion.
-
Validate () method of ActionForm, if error return to error.jsp
-
Validate () method of ActionForm, execute () of Action, if error return to jsp mentioned in input tag.
-
Validate () method of ActionForm, if error return to jsp mentioned in input tag.
-
None of the above
C
Correct answer
Explanation
When validate='true' in struts-config.xml action mapping, the sequence is: 1) ActionForm populate() from request parameters, 2) ActionForm validate() is called, 3) If validate() returns non-empty ActionErrors, control returns to the JSP specified in the 'input' attribute of the action mapping. The Action's execute() is NOT called if validation fails.
-
Call the reset method if validation fails
-
Set the tag's redisplay property to false
-
Set the tag's reset property to false
-
Use a plain html tag instea
B
Correct answer
Explanation
The tag has a redisplay property that controls whether the password value is redisplayed after validation fails. Setting redisplay='false' prevents the password from being shown in the form field, which is a security best practice to prevent password exposure in browser memory/view source.
-
Validate() method of ActionForm called automatically
-
Validate() method of Action called automatically
-
Validate() method of ActionForm Not Called automatically
-
None Of the above
C
Correct answer
Explanation
When validate="false" is configured in the `tag ofstruts-config.xml, the Struts framework bypasses automatic form validation. Consequently, thevalidate()method of the associatedActionForm` is not called automatically before the request is forwarded to the Action class. Other options incorrectly state that validation is triggered.
-
validation.xml
-
validator-rules.xml
-
both files
-
None
B
Correct answer
Explanation
In the Struts validation framework, the validator-rules.xml file contains the standard validation rules along with the JavaScript code required for client-side validation. In contrast, validation.xml is used to define the specific validation rules applied to individual form fields, rather than holding the underlying JavaScript code.
-
10
-
100
-
1000
-
No restriction
C
Correct answer
Explanation
In Oracle WebCenter Content, the default value for the maximum depth of collection navigation (controlled by configuration parameters like CollectionNavigationDepth) is set to 1000. This default ensures deep hierarchical structures can be navigated without performance degradation, while options like 10, 100, or unlimited are not the standard defaults.
B
Correct answer
Explanation
The statement is False. The option "Reject these Document Patterns" specifies document patterns that should be excluded (rejected) from the collection, not included.