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
A
Correct answer
Explanation
WDK (Web Development Kit) controls are server-side components that generate HTML markup when rendered. This is the fundamental purpose of such frameworks - to abstract HTML generation behind reusable control components.
-
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.
B
Correct answer
Explanation
HTML5 provides both audio and video elements for media playback. The element handles sound files while the element handles video content with optional captions and tracks. Therefore the statement that HTML5 has only audio elements is false.
A
Correct answer
Explanation
Although modern web browsers have exceptionally high compatibility with HTML5, none implement 100% of all HTML5 specifications, experimental features, and peripheral APIs. Therefore, the statement remains true, as full, comprehensive compliance across every detail has not been fully achieved by any single browser.
A,C
Correct answer
Explanation
HTML5 standardizes support for three audio formats in the `` element: MP3, Wav, and Ogg. While AAC is supported by many modern browsers, MP3 and Wav are the officially recognized standard options listed here, whereas AIFF is not standard. Thus, MP3 and Wav are correct.
-
Ogg
-
WebM
-
MPEG 4
-
HTML5 doesn't have video elements
A,B,C
Correct answer
Explanation
HTML5 officially supports three video formats for the `` element: MP4 (MPEG 4 with H.264 video and AAC audio), WebM (with VP8/VP9 video and Vorbis/Opus audio), and Ogg (with Theora video and Vorbis audio). The claim that HTML5 lacks video elements is false.
B
Correct answer
Explanation
HTML5 became an official W3C Recommendation in October 2014. The statement is false because HTML5 is indeed a W3C recommendation - it completed the standardization process and is now a formal web standard.
A
Correct answer
Explanation
The `` element is only a container for graphics and has no drawing capabilities of its own. It requires JavaScript to access the rendering context and perform drawing operations like rendering shapes, paths, text, or images. Therefore, the statement is true.
-
Object
-
Plain text
-
xml
-
e4x
A
Correct answer
Explanation
When the class in Adobe Flex returns complex data (like XML or JSON), the default resultFormat is 'object'. This means the response is automatically parsed and converted into an ActionScript object structure. Other formats like 'xml', 'e4x', or 'text' must be explicitly specified if needed.
-
<%-- comment --%>
-
<!-- comment -->
-
<% // comment %>
-
<% /* comment */ %>
-
<% /** comment */ %>
A
Correct answer
Explanation
JSP comments use <%-- comment --%>. These are server-side comments that are completely removed from the generated HTML - the browser never sees them. HTML comments would be visible to users viewing page source.
-
Extensible Book Notation Format
-
a replacement for the SAX XML parser
-
the leader of the free software foundation
-
a syntax for defining grammar
D
Correct answer
Explanation
EBNF (Extended Backus-Naur Form) is a notation for formally defining the grammar of programming languages and other formal languages. It extends the original BNF notation with additional features like repetition, optional elements, and grouping, making it more expressive for specifying syntax rules.
A
Correct answer
Explanation
JSP (JavaServer Pages) allows embedding Java code directly within the page using scriptlets (<% %>) and expressions (<%= %>). You can write pure Java code including variable declarations, method calls, control flow statements, and expressions. The JSP container translates this Java code into servlet code during compilation.
B
Correct answer
Explanation
JSP pages can include both other JSP pages and HTML pages. The standard action can include any resource, including HTML pages, at runtime. The <%@ include %> directive can include static content like HTML files at translation time. There is no restriction that only JSP pages can be included.