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

Multiple choice xhtml
  1. A method tied to an object

  2. A Detrimental Transitional Development

  3. The Document Type Declaration

  4. The Difinitive Type Definition

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

DTD stands for Document Type Declaration. It defines the structure and legal elements of an XML or XHTML document, telling parsers which tags and attributes are valid.

Multiple choice xhtml
  1. XHTML and SGML are both subsets of HTML

  2. XHTML is a subset of SGML

  3. SGML is a subset of XHTML

  4. SGML is a simplified version of XHTML

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

XHTML is defined as a subset of SGML (Standard Generalized Markup Language), just as HTML is. SGML is the parent meta-language from which both HTML and XHTML derive their rules. Option A is incorrect because HTML and XHTML are subsets of SGML, not the reverse.

Multiple choice xhtml
  1. XHTML documents are not parsed in the browser before display

  2. XHTML is parsed with a DTD

  3. The Doctype Declaration indicates to the parser which DTD to use

  4. XHTML syntax needs to be well formed

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The statement in option A is false - XHTML documents ARE parsed by browsers before display. Options B, C, and D are all true statements: XHTML uses DTDs, the doctype declaration specifies which DTD to use, and XHTML requires well-formed syntax. Since the question asks which statement is false and A is marked as correct (meaning A is the false statement), this is consistent.

Multiple choice xhtml
  1. XHTML is more advanced than HTML

  2. HTML and XHTML are both the same language

  3. XML and XHTML are written in the same mannor

  4. HTML will load faster than XHTML in most cases

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

XHTML is often considered more 'advanced' or 'rigorous' than HTML because it applies XML's strict syntax rules to HTML. This makes it easier for automated tools to parse and process, though HTML5 has since bridged many of these gaps.

Multiple choice xhtml
  1. HTML will still be the choice of most professional web developers for many years to come

  2. XHTML will replace most of the HTML pages on the internet

  3. XHTML is a replacement for HTML

  4. HTML causes a lot of problems on the internet in it current form

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Option A makes the least sense because XHTML was specifically designed to address HTML's problems and was expected to replace it for professional development. Options B, C, and D all reflect the historical reality: XHTML was intended as an HTML replacement, HTML had known issues, and XHTML was being adopted. The framing suggests A is the answer because it contradicts the XHTML migration trend of the early 2000s.

Multiple choice xhtml
  1. It is not always best to validate XHTML

  2. The statment is false

  3. This is a true statement

  4. XHTML is not validated

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

XHTML should be validated to ensure it conforms to its DTD and is properly well-formed. Validation catches syntax errors and ensures compatibility across browsers. Option C correctly states that validation is beneficial.

Multiple choice xhtml
  1. The code should be written in uppercase letters

  2. The XHTML document should be valid and well formed

  3. All end tags should be left open

  4. You require a special type of browser

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

For XHTML to function properly, documents must be both valid (conform to DTD) and well-formed (properly nested, closed tags, quoted attributes). XHTML syntax is case-sensitive and requires lowercase elements. Option B is correct.

Multiple choice xhtml
  1. The opening and closing tags should start and end with XHTML

  2. The end tags of the img tag should be left open

  3. Uppercase letters should not be used between the opening and closing tags

  4. The Doctype Declaration should have a closing tag simular to the img tag or the meta tag

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In XHTML, all element and attribute names must be in lowercase. While the content between tags can contain uppercase letters, the tags themselves must be lowercase. Additionally, all tags must be closed (e.g., ), and the document must be well-formed.

Multiple choice xhtml
  1. Attributes do not have quotes for their values

  2. All attributes values require quotes

  3. All values require attributes

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In XHTML, all attribute values MUST be enclosed in quotes (single or double). This is a strict requirement differing from HTML where quotes were sometimes optional for simple values. Option B is correct.

Multiple choice xhtml
  1. <P></p>

  2. <P></P>

  3. <p></p>

  4. </p><p>

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

XHTML is a stricter, XML-based version of HTML. One of its primary rules is that all tags must be in lowercase. Therefore,

is the correct XHTML syntax, whereas uppercase tags like

are invalid in XHTML.

Multiple choice xhtml

  1. <break/>



Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

XHTML requires all elements to be properly closed. For empty elements like line breaks, this means using the self-closing syntax with a space before the slash:
. Option D is correct. The traditional HTML
is invalid in XHTML.

Multiple choice xhtml
  1. WIDTH="80"

  2. width="80"

  3. width=80

  4. Width=80

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

XHTML requires all attribute names and values to be in lowercase, and attribute values must be quoted. The correct format is width="80" (all lowercase, quotes around value). Option B is correct. Options A and D use uppercase, and option C lacks quotes.

Multiple choice xhtml
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

XHTML is stricter than HTML - every element must be properly closed, including empty elements which use self-closing syntax like
or . This is a fundamental rule that distinguishes XHTML from HTML.

Multiple choice xhtml
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The DOCTYPE declaration is not an HTML/XHTML element - it's a document type declaration that tells the browser which version of HTML/XHTML to use. Declarations, unlike elements, do not have closing tags.

Multiple choice xhtml
  1. doctype, html and body

  2. doctype, html, head, body, and title

  3. doctype, html, head, and body

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

XHTML documents require a complete structure: the DOCTYPE declaration at the top, then as the root element, which must contain and sections. The section must contain a element.