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
XML requires all attribute values to be enclosed in either single or double quotes. This is a strict syntax rule - unquoted attributes are invalid.
-
Hypertext Markup List
-
Happytext Markup Language
-
Hypertext Mark Language
-
Hypertext Markup Language
D
Correct answer
Explanation
HTML stands for Hypertext Markup Language, which serves as the standard markup language for structuring and creating web pages. The other options are incorrect variations that replace standard terms with incorrect words like List, Happytext, or Mark.
-
<-Comment->
-
<--Comment-->
-
<!--Comment-->
-
<Comment/>
C
Correct answer
Explanation
The standard syntax for comments in HTML is . This prevents the enclosed text from being rendered by browsers. Distractors like <--Comment--> or <-Comment-> lack the correct exclamation mark and double-hyphen structure required by the HTML parser.
A
Correct answer
Explanation
The
(unordered list) tag creates bulleted lists in HTML. creates numbered lists, - is for individual list items inside either
or , and is not a valid HTML tag.
-
<img display="image.gif" />
-
<img image="image.gif" />
-
<img src="image.gif" />
-
<img ="image.gif" />
C
Correct answer
Explanation
HTML images use the self-closing
tag with a 'src' attribute pointing to the image file path:
. 'display', 'image', and bare '=' are not valid image attributes.
-
Radio Buttons
-
Checkboxes
-
Form
-
Text Field
B
Correct answer
Explanation
Checkboxes are designed to let users select multiple independent options from a given list of choices in an HTML form. In contrast, radio buttons restrict selection to a single option, while text fields and forms do not serve as multi-select input controls.
-
eXtra Hypertext Markup Language
-
eXtension Hypertext Markup Language
-
eXtensible Hypertext Markup Language
-
eXtended Hypertext Markup Language
C
Correct answer
Explanation
XHTML stands for eXtensible Hypertext Markup Language; it reformats HTML as XML (strictly well-formed, closing tags required). It's not an extension or extra version of HTML.
C
Correct answer
Explanation
The
tag defines a description list (formerly known as a definition list) in HTML, which contains groups of terms (- ) and descriptions (
- ). While
- and
- are child elements representing individual terms and details,
is the container tag that initializes the list itself.
-
<abbr>
-
<abr>
-
<abbreviation>
-
<ab>
A
Correct answer
Explanation
The HTML tag is standardly used to mark up abbreviations or acronyms, allowing browsers, search engines, and translation systems to identify them. The other options (, , and ) are invalid HTML tags and are not recognized by the HTML specification.
-
<title="Web Designer Help"></title>
-
<title=Web Designer Help/>
-
<title="Web Designer Help"/title>
-
<title>Web Designer Help</title>
D
Correct answer
Explanation
The title tag is a standard HTML element used to specify the title of a webpage. It requires a standard start tag and end tag enclosing the text. Other options incorrectly format the element by placing the text inside attributes or utilizing self-closing tag syntax.
-
<? ?>
-
<script language=”php”> </script>
-
<% %>
-
<?php ?>
D
Correct answer
Explanation
To solve this question, the user needs to know about the different PHP tags and their compatibility with XML or XHTML.
Option A: ?> is a valid PHP tag but it is not recommended to use as it may conflict with XML processing instruction. It is also not recommended to use with XHTML.
Option B: is not a valid PHP tag and will not be parsed as PHP code. It may work on some servers with specific configurations, but it is not portable or recommended.
Option C: <% %> is a valid PHP tag, but it is not compatible with XML or XHTML. It is used in ASP-style syntax.
Option D: is the recommended and most portable version of the PHP tag. It is compatible with XML or XHTML and is widely supported on different servers and configurations.
Therefore, the correct answer is:
The Answer is: D.
-
Add a TYPE=HIDDEN INPUT to the form
-
Trap the return keypress and return (null)
-
Add 'return false' to onsubmit="..." in the FORM tag
-
Instruct the user not to press the Return key.
C
Correct answer
Explanation
Adding 'return false' to the onsubmit handler prevents the form from being submitted when the Return key is pressed, which would otherwise submit the form before the button click. TYPE=HIDDEN doesn't prevent submission, trapping keypress is JavaScript-heavy, and instructing users isn't a technical fix.