What does XHTML stand for?
A
Extensive HyperText Markup Language
B
Extra HighText Machine Language
C
Extensible HyperText Markup Language
Analysis & Theory
XHTML stands for Extensible HyperText Markup Language. It is a stricter and XML-based version of HTML.
Which of the following is **not** a difference between HTML and XHTML?
A
XHTML is case-sensitive; HTML is not
B
XHTML must be well-formed; HTML allows leniency
C
XHTML requires closing all tags; HTML doesn't always
D
HTML doesn't support forms, but XHTML does
Analysis & Theory
Both HTML and XHTML support forms. This is not a difference between the two.
Which tag format is correct in **XHTML** but not required in **HTML**?
Analysis & Theory
In XHTML, all tags must be properly closed, so `<br />` is the correct self-closing syntax.
In XHTML, which of the following is required?
B
Optional quotes around attribute values
Analysis & Theory
XHTML requires lowercase tag names and attributes to follow XML rules.
What will happen if an XHTML document is **not well-formed**?
A
It will still render in all browsers
B
It will automatically convert to HTML
C
It may not be displayed correctly or at all
D
It will display an alert
Analysis & Theory
XHTML must be well-formed; otherwise, the browser may stop rendering or throw an error.
Which doctype is typically used for XHTML 1.0 Strict?
C
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ...>
Analysis & Theory
This doctype is the proper declaration for XHTML 1.0 Strict.
In XHTML, how must attribute values be written?
B
They must use single quotes
C
They must be enclosed in double or single quotes
D
They must use angle brackets
Analysis & Theory
In XHTML, all attribute values must be enclosed in either double or single quotes.
Which of these is valid in HTML but **not valid** in XHTML?
B
<img src='image.jpg' />
Analysis & Theory
In XHTML, `<img>` must be self-closed as `<img ... />`. Leaving it unclosed is invalid.
Which of these is **not allowed** in XHTML?
A
Missing `alt` attribute in `<img>`
C
Using uppercase tag names
Analysis & Theory
All of these break XHTML rules: tag names must be lowercase, doctype is required, and `alt` is mandatory in `<img>`.
Which is more forgiving with incorrect syntax?
D
Neither supports errors
Analysis & Theory
HTML is more lenient with syntax errors, whereas XHTML follows strict XML rules.