0% found this document useful (0 votes)
2 views2 pages

Post Class Assessment Lecture 7

The document contains post-class assessment questions on XHTML, including multiple choice, true/false, fill in the blanks, and short answer questions. It covers key concepts such as XHTML syntax requirements, DOCTYPE declarations, and the importance of well-formed documents. The assessment aims to evaluate understanding of XHTML's stricter rules compared to HTML.

Uploaded by

vanshaj rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Post Class Assessment Lecture 7

The document contains post-class assessment questions on XHTML, including multiple choice, true/false, fill in the blanks, and short answer questions. It covers key concepts such as XHTML syntax requirements, DOCTYPE declarations, and the importance of well-formed documents. The assessment aims to evaluate understanding of XHTML's stricter rules compared to HTML.

Uploaded by

vanshaj rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Post-Class Assessment Questions on XHTML: Syntax and

Semantics
Multiple Choice Questions (MCQs)

1. Which of the following is NOT a requirement in XHTML?


a) All tags must be properly nested
b) All elements must be lowercase
c) Empty elements must be closed
d) Using <b> instead of <strong> is invalid

2. What happens if an XHTML document has an unclosed tag?


a) It will render normally in all browsers
b) It may not work properly in XML parsers
c) The browser will automatically close it
d) The document will still be valid

3. Which DOCTYPE declaration is used for strict XHTML 1.0?


a) <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
b) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
c) <!DOCTYPE xhtml PUBLIC "-//W3C//DTD XHTML 1.0//EN">
d) <!DOCTYPE html SYSTEM "xhtml.dtd">

4. In XHTML, which of the following is the correct way to include an image?


a) <img src="logo.png">
b) <img src="logo.png">
c) <img src="logo.png" />
d) <img src="logo.png"></img>

5. What will happen if an XHTML document does not have the xmlns attribute in the
<html> tag?
a) The browser will ignore it
b) The document may not be properly interpreted as XHTML
c) The document will not be displayed at all
d) Nothing, as the xmlns attribute is optional

True or False

6. XHTML documents can be parsed by XML parsers. (True/False)


7. Attribute values in XHTML can be written without quotes. (True/False)
8. The <p> tag in XHTML can be written as <p /> when empty. (True/False)
9. XHTML requires all tags to be written in uppercase. (True/False)
10. XHTML follows the same syntax rules as XML. (True/False)
Fill in the Blanks

11. XHTML is based on ________, making it stricter and more structured than HTML.
12. In XHTML, all attribute values must be enclosed in ________.
13. The DOCTYPE declaration is placed at the ________ of an XHTML document.
14. XHTML ensures better compatibility with ________ devices.
15. The correct MIME type for serving XHTML documents is ________.

Short Answer Questions

16. Explain why XHTML requires self-closing tags for empty elements.
17. How does XHTML improve accessibility and web standards compliance?
18. What are the main differences between XHTML Strict, Transitional, and Frameset?
19. Why must XHTML documents be well-formed?
20. Write a simple XHTML document structure with a heading and a paragraph.

You might also like