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
B
Correct answer
Explanation
StAX (Streaming API for XML) is a pull-based parser where the application explicitly requests the next event from the parser using methods like hasNext() and next(). This contrasts with SAX, which is push-based and pushes events to handler methods.
-
ps:includeif
-
ps:excludeif
-
ps:getValue
-
ps:getAttributes
D
Correct answer
Explanation
ps:getAttributes is not a valid PS Framework tag, while ps:includeif, ps:excludeif, and ps:getValue are all legitimate PS tags used for conditional rendering and value retrieval. The getAttributes functionality likely uses a different syntax or method in the framework.
A
Correct answer
Explanation
The is a custom JSP tag from the framework's tag library. As long as the required attributes are provided (the name attribute, even if empty string), it follows the framework's tag definition syntax and is a valid tag declaration.
B
Correct answer
Explanation
UML (Unified Modeling Language) is the standard visual modeling language for specifying, visualizing, constructing, and documenting business objects and software systems. It uses various diagram types to represent system structure and behavior.
-
<?xml version="1.0"?>
-
<?xml version="1.0" />
-
<xml version="1.0" />
-
<xml version=1.0 />
A
Correct answer
Explanation
The XML declaration must start with . It uses question marks on both sides, not a slash like other XML tags. Options B, C, and D are incorrect because they either use the wrong closing syntax or don't start with the proper XML declaration marker.
B
Correct answer
Explanation
A well-formed XML document must have exactly one root element containing all other elements. This document has four sibling root elements (to, from, heading, body) without a wrapper element, so it is not well-formed.
B
Correct answer
Explanation
XML elements can be empty. They can be written as or using the self-closing syntax . Empty elements are commonly used in XML for elements that don't need content.
-
<![CDATA[ Text to be ignored ]]>
-
<xml:CDATA[ Text to be ignored ]>
-
<PCDATA> Text to be ignored </PCDATA>
-
<CDATA> Text to be ignored </CDATA>
A
Correct answer
Explanation
CDATA sections in XML use the syntax to tell the parser to treat the content as literal text, not markup. This is used for containing special characters or code snippets that would otherwise be interpreted as XML.
-
<h1>
-
<h6>
-
<head>
-
<heading>
A
Correct answer
Explanation
HTML headings are numbered from 1 to 6, where
is the largest and most important heading, and is the smallest. The tag contains metadata, not visible content, and there is no tag in HTML.
-
<input type="check" />
-
<check>
-
<checkbox>
-
<input type="checkbox" />
D
Correct answer
Explanation
HTML checkboxes are created using the tag with type="checkbox": . There are no or tags in HTML. The type attribute must be exactly "checkbox", not "check".
-
<JS></JS>
-
<JSCRIPT></JSCRIPT>
-
<JAVA></JAVA>
-
<SCRIPT></SCRIPT>
D
Correct answer
Explanation
JavaScript is embedded in HTML using the tag. There are no , , or tags in HTML. The SCRIPT tag is the standard way to include client-side scripting code.
-
<?xml version="1.0"?>
-
<xml version="1.0"/>
-
<?xml version="1.0"/>
-
<?xml version=1.0>
A
Correct answer
Explanation
The XML declaration must start with . Option A is correct. Option B uses the wrong tag name without the question mark. Option C uses /> instead of ?> which is incorrect. Option D is missing quotes around the version value.
B
Correct answer
Explanation
A well-formed XML document must have exactly one root element containing all other elements. This XML has four root-level elements (, , , ), which violates XML's single-root rule, making it invalid.
B
Correct answer
Explanation
XML elements can be empty using self-closing syntax like
or . Empty elements are perfectly valid in XML and are commonly used for elements without content.