XHTML Quiz

Description: XHTML Quiz
Number of Questions: 10
Created by:
Tags: xhtml
Attempted 0/10 Correct 0 Score 0

What is the correct XHTML for an attribute and its value?

  1. WIDTH="80"

  2. width="80"

  3. width=80

  4. Width=80


Correct Option: B

AI Explanation

To answer this question, you need to understand the correct syntax for attributes and their values in XHTML.

Option A) WIDTH="80" - This option is incorrect because attribute names in XHTML are case-sensitive. The correct casing for the attribute "width" is lowercase.

Option B) width="80" - This option is correct because it follows the correct syntax for attributes and their values in XHTML. In XHTML, attribute names are lowercase, and their values are enclosed in double quotation marks.

Option C) width=80 - This option is incorrect because attribute values in XHTML should be enclosed in double quotation marks. Without the quotation marks, the value is considered a number or a string, rather than a valid attribute value.

Option D) Width=80 - This option is incorrect because attribute names in XHTML are case-sensitive. The correct casing for the attribute "width" is lowercase.

The correct answer is B) width="80". This option is correct because it follows the correct syntax for attributes and their values in XHTML, with the attribute name in lowercase and the value enclosed in double quotation marks.

All elements in XHTML must be closed

  1. True

  2. False


Correct Option: A

The DOCTYPE declaration has no closing tag

  1. True

  2. False


Correct Option: A

Which elements are mandatory in an XHTML document?

  1. doctype, html and body

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

  3. doctype, html, head, and body


Correct Option: B

What XHTML code is "well-formed"?

  1. A short paragraph

  2. A short paragraph

  3. A short paragraph


Correct Option: B

Which of the following is the right use of the lang attribute?

  1. Hello World!
  2. Hello World!
  3. Hello World!

Correct Option: A

What are the different DTDs in XHTML?

  1. Strict, Transitional, Loose, Frameset

  2. Strict, Transitional, Frameset

  3. Strict, Transitional, Loose


Correct Option: B

What is the most common XHTML DTD?

  1. Loose

  2. Normal

  3. Transitional

  4. Frameset


Correct Option: C

Do all XHTML documents require a doctype?

  1. Yes

  2. No


Correct Option: A

All XHTML tags and attributes must be in lower case

  1. True

  2. False


Correct Option: A
- Hide questions