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
-
be self-descriptive
-
disply only useful data
-
carrying request
-
giving response.
A
Correct answer
Explanation
XML Schema is designed to be self-descriptive, providing a way to define the structure, content, and data types of XML documents. Unlike DTDs, XML Schema is itself written in XML and allows for complex type definitions and constraints.
-
an XHTML Schema to describe the data
-
an XPath to describe the data
-
an XML Schema to describe the data
-
an XQuerya to describe the data
C
Correct answer
Explanation
XML Schema is the standard W3C recommendation for describing and validating XML document structure. It defines elements, attributes, and data types, replacing the older DTD approach with more powerful validation capabilities.
-
HTML.
-
WAP and WML
-
XSL
-
XSLT
B
Correct answer
Explanation
XML serves as the foundation for many markup languages. WML (Wireless Markup Language) and WAP (Wireless Application Protocol) are XML-based technologies designed for mobile and wireless devices, making XML their 'mother' or parent technology.
-
Not Extensible.
-
A stylsheet
-
Free and Extensible
-
None of these
C
Correct answer
Explanation
XML is both free (open standard) and extensible (you can define your own tags and attributes). The 'X' in XML stands for Extensible, which is its key feature allowing custom markup languages for specific domains.
-
<?xml-stylesheet type="text/xsl" href="mystyle.xsl"?>
-
<stylesheet type="text/xsl" href="mystyle.xsl" />
-
<link type="text/xsl" href="mystyle.xsl" />
-
None of these
-
<NAME>
-
<first name>
-
<age>
-
All three names are incorrect
B
Correct answer
Explanation
XML element names cannot contain spaces. Option B '' contains a space which violates XML naming rules. Element names must start with a letter or underscore and can contain letters, digits, hyphens, underscores, and periods only.
-
EXtendable Stylesheet Language
-
EXtensible Stylesheet Language
-
EXtensible Style Language
-
EXtendable Style Language
B
Correct answer
Explanation
XSL stands for EXtensible Stylesheet Language. It's a family of languages used to transform and render XML documents. The spelling is EXtensible (with 'e'), not EXtendable (with 'd').
-
XSLT,Xpath,HTML
-
XSLT,Xpath,ASP
-
XSLT,Xpath,XSL-FO
-
XSLT,Xpath,XHTML
C
Correct answer
Explanation
XSL has three components: XSLT (for transformation), XPath (for navigation), and XSL-FO (for formatting). XSLT transforms XML to other formats, XPath navigates XML documents, and XSL-FO handles formatting for presentation.
-
template
-
file
-
page
-
directory
A
Correct answer
Explanation
XSL processors parse the XML source tree and match nodes against template rules in the stylesheet. Each template defines how to process a particular node or set of nodes, enabling recursive transformation of the entire document.
-
levels
-
pages
-
template
-
Modes
D
Correct answer
Explanation
Modes in XSL allow the same element to be processed multiple times with different templates. Each mode can have different matching rules, enabling complex transformations where elements need different treatments at different stages.
C
Correct answer
Explanation
In XPath and XSLT, attributes are accessed using the @ symbol prefix. For example, @id selects the 'id' attribute of the current node. This distinguishes attributes from elements which are selected by name alone.
-
xsl:for
-
xsl:for-each
-
xsl:do-while
-
xsl:while
B
Correct answer
Explanation
xsl:for-each is an XSLT instruction that processes a set of nodes selected by an XPath expression. It iterates over each node in the node-set and applies the contained template instructions to every node. The select attribute contains the XPath expression that identifies which nodes to process. This is the primary looping construct in XSLT for transforming XML documents. Options A, C, and D are not valid XSLT elements - the correct names are xsl:for-each, xsl:if, and xsl:choose/xsl:when/xsl:otherwise respectively.
-
browser
-
file
-
input
-
output
D
Correct answer
Explanation
xsl:number inserts formatted numbers into the output stream during XSLT transformation. It's used to add sequential numbering to output documents - for example, numbering list items, chapters, or table rows. The number can be formatted with various attributes (format, letter-value, grouping-separator, etc.) to control whether it appears as 1, 2, 3 or I, II, III or a, b, c, etc. The output is the transformed result document being generated, which could be sent to a browser, saved to a file, or used elsewhere. Options A, B, and C are all destinations/consumers of output, not where xsl:number inserts during transformation.
-
Extensible Stylesheet Language Translators
-
Extended Stylesheet Language Transformation
-
Extensible Style Language Transformation
-
Extensible Stylesheet Language Transformation
D
Correct answer
Explanation
XSLT stands for Extensible Stylesheet Language Transformation. It is a W3C standard language for transforming XML documents into other formats. The key words are Extensible, Stylesheet, Language, and Transformation - which is the correct expansion.
-
W3C Recommendation
-
Cascading Style Sheets
-
uses XPath to navigate in XML documents
-
transforms an XML document into another XML document