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
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.
-
<![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 parsers to treat the content as literal text, ignoring any special characters or markup within. Option A shows the correct syntax.
-
<h1>
-
<h6>
-
<head>
-
<heading>
A
Correct answer
Explanation
In HTML, heading tags range from
(largest) to (smallest). The tag contains metadata like title and styles, not visible content. Option A is correct.
-
<background>yellow</background>
-
<body background="yellow">
-
<body style="background-color:yellow">
-
<body style="background-color='yellow'">
C
Correct answer
Explanation
Modern HTML uses CSS for styling. The correct inline CSS approach is style="background-color:yellow" (option C). The background attribute in option B is deprecated HTML4 syntax.
-
<input type="check" />
-
<check>
-
<checkbox>
-
<input type="checkbox" />
D
Correct answer
Explanation
HTML checkboxes are created using the tag with type="checkbox" (option D). There is no dedicated or tag in HTML. Checkboxes are a type of input element.
-
<JS></JS>
-
<JScript></JScript>
-
<java></java>
-
<script></script>
D
Correct answer
Explanation
JavaScript is embedded in HTML using tags (option D). There are no , , or tags in HTML. The script tag is the standard container for JavaScript code.
A
Correct answer
Explanation
The correct syntax to open a new window in JavaScript uses the window.open() method with parentheses. Option A shows w2=window.open("http://www.w3schools.com"); which is correct. Option B is missing parentheses, and options C and D use the non-existent window.new() method.
-
all child nodes
-
all elements
-
all elements which have attributes
-
no meaning at all
B
Correct answer
Explanation
In XPath expressions, the double slash // selects nodes from the current node downward regardless of the document structure, and the asterisk * matches any element node. Together, //* selects all element nodes in the document.
-
PHP can be used to develop web applications.
-
PHP makes a website dynamic
-
PHP applications can not be compiled
-
PHP can not be embedded into html.
D
Correct answer
Explanation
Option D 'PHP can not be embedded into html' is the statement that is NOT true. PHP was specifically designed to be embedded directly into HTML using PHP tags (), which is one of its fundamental features. Options A and B are true - PHP is widely used for web applications and makes websites dynamic by generating HTML content on-the-fly. Option C is technically true in that PHP is traditionally an interpreted language, though modern tools like HHVM, Phalanger, and Bcompiler can compile PHP applications for performance optimization.
-
<? ?>
-
<script language=”php”> </script>
-
<% %>
-
NONE
-
You can use any of the delimiting style
-
You can use different delimiting styles in same page
-
You can use any delimiting style but must use a single style consistently for a page
-
Variables declared in previous blocks are remenbered on later blocks too!
C
Correct answer
Explanation
PHP allows mixing different delimiter styles in the same page, so the statement requiring a single consistent style is false. Option A claims you can use any style (true). Option B claims you can mix styles in same page (true). Option D is true - variables persist across PHP blocks on the same page. Only C is false.
A
Correct answer
Explanation
When an .aspx page is requested, ASP.NET processes it server-side and generates HTML that is sent to the browser. The browser receives and renders standard HTML - it does not receive XML, WML (Wireless Markup Language), or JSP (JavaServer Pages) format. The output is always HTML (or XHTML which is HTML-compatible).
-
Hyper Text Mark Language
-
HyperText Multiple Languages
-
HyperText Markup Language
-
Hyperlink Markup Languages
C
Correct answer
Explanation
HTML stands for HyperText Markup Language, which accurately describes its function of creating structured documents with hypertext links. Option A incorrectly omits 'up' from 'Markup,' while Option B incorrectly suggests it handles multiple languages and Option D focuses on hyperlinks rather than markup.
-
X-TENSIBLE MARKUP LANGUAGES
-
EXTENSIBLE MARKUP LANGUAGE
-
XHTML MARKUP LANGUAGE
-
EXTENSIBLE MARK-UP LANGUAGES
B
Correct answer
Explanation
XML stands for 'eXtensible Markup Language' - a markup language designed to store and transport data in a structured, human-readable format. The 'X' comes from 'eXtensible' (with a lowercase E), emphasizing that users can define their own custom tags. Option B has the correct spelling. Option A uses 'X-TENSIBLE' incorrectly, and D adds a hyphen to 'Markup' and uses 'Languages' (plural).
-
JavaScript library
-
HTML component
-
CSS component
-
XML component
A
Correct answer
Explanation
jQuery is a fast, small, and feature-rich JavaScript library that simplifies HTML document traversal, event handling, animation, and AJAX interactions. It is not a component of HTML, CSS, or XML, but rather a cross-browser JavaScript library designed to make client-side scripting easier.