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
-
Example Markup Language
-
X-Markup Language
-
eXtra Modern Link
-
eXtensible Markup Language
D
Correct answer
Explanation
XML stands for eXtensible Markup Language, where the 'X' represents 'eXtensible' indicating that users can define their own custom tags and markup structures. This extensibility is what distinguishes XML from fixed markup languages like HTML. Options A, B, and C are made-up expansions.
-
In XML,both the tag semantics and the tag set are fixed
-
XML is a meta-language for describing markup languages
-
XML is a restricted form of SGML
-
All the above
B,C
Correct answer
Explanation
XML is a meta-language for defining markup languages (option B), meaning it provides rules for creating custom tag sets rather than having fixed tags. XML is indeed a restricted form of SGML (option C), designed to be simpler while retaining SGML's extensibility. Option A is false because XML's tag semantics and tag sets are not fixed.
-
XML elements must have a closing tag
-
XML tags must be lower case
-
XML elements must be properly nested
-
XML attribute values must be quoted
A,C,D
Correct answer
Explanation
XML requires all elements to have closing tags (A) and be properly nested (C). Attribute values must be quoted (D). However, XML tags are case-sensitive but not required to be lowercase (B is false) - 'Name' and 'name' are different tags, but uppercase is valid. These rules ensure well-formed XML documents.
A
Correct answer
Explanation
XML comments are not part of the document's textual content - they are metadata. XML processors are NOT required to pass comments to applications, and applications typically cannot access them through standard DOM/SAX parsing APIs. This distinguishes comments from actual document data.
-
<?xml version="1.0" />
-
<?xml version="1.0"?>
-
<xml version="1.0" />
-
None of the above
B
Correct answer
Explanation
The XML version declaration must use the processing instruction syntax with both opening and closing question marks: . Option A incorrectly closes with />, which is only used for empty elements. Option C omits the required question marks. The declaration must appear at the very start of an XML document.
A
Correct answer
Explanation
XML parsers preserve whitespace in documents by default unless explicitly configured to trim it. The XML specification treats whitespace as significant content, not something to be automatically truncated. This is different from HTML where whitespace is often normalized.
-
<7lastname>
-
<lastname>
-
<last name>
-
<last_name>
A,C
Correct answer
Explanation
XML element names must follow strict naming rules. They cannot start with a number (7lastname is invalid) and cannot contain spaces (last name is invalid). Valid names like lastname and last_name follow the rules: starting with a letter or underscore, and containing only letters, digits, hyphens, underscores, or periods.
-
Names cannot start with a number or punctuation character
-
Names cannot start with the letters xml (or XML, or Xml, etc)
-
Names can contain spaces
-
All the above
A,B
Correct answer
Explanation
XML element names must follow specific rules: they cannot start with numbers or punctuation characters (statement A is true), and they cannot start with 'xml' in any case combination as this is reserved (statement B is true). Statement C is false because spaces are not allowed in XML names. Therefore, 'All the above' (D) is incorrect.
B
Correct answer
Explanation
Directly editing webtop/app.xml is not the recommended or correct way to configure elements. The framework likely provides specific configuration tools, UI interfaces, or other configuration mechanisms that should be used instead of manual file edits to maintain consistency and avoid breaking the application.
-
Names cannot start with a number or punctuation character
-
Names cannot start with the letters xml (or XML, or Xml, etc)
-
Names can contain spaces
-
Non-English letters like éòá are perfectly legal in XML
C
Correct answer
Explanation
XML names cannot contain spaces - this violates XML naming rules. Spaces are not allowed in element or attribute names, though they are valid in content values. Names must start with a letter or underscore, and can contain letters, digits, hyphens, underscores, and periods.
-
Example Markup Language
-
X-Markup Language
-
eXtra Modern Link
-
eXtensible Markup Language
D
Correct answer
Explanation
XML stands for eXtensible Markup Language. It was designed to be a flexible, extensible markup language unlike HTML which has fixed tags. The name reflects its core design philosophy.
-
<?xml-stylesheet type="text/xsl" href="mystyle.xsl" ?>
-
<stylesheet type="text/xsl" href="mystyle.xsl" />
-
<link type="text/xsl" href="mystyle.xsl" />
-
None of the above
A
Correct answer
Explanation
XML stylesheets are referenced using a processing instruction with the format . This is the standard way to link an XSL stylesheet to an XML document for transformation or formatting.
-
In Application tag
-
In Script tag
-
We can use either a or b
-
None of the above
-
?
-
xml=”version”
-
encode=”utf-8”
-
None of the above
C
Correct answer
Explanation
The XML declaration is optional in MXML files, and within it, the encoding attribute is not mandatory. The question asks which part is NOT required, and encoding can be omitted while still having a valid MXML file.
-
In Application tag
-
In Script tag
-
We can use either a or b
-
None of the above
A
Correct answer
Explanation
MXML files are included within the mx:Application tag or referenced as components. The Script tag is for ActionScript code only, not for including MXML files.