62 CHAPTER 2 Getting started with HTML5
Answers
This section contains the answers to the lesson review questions in this chapter.
Lesson 1
- Correct answer: C
A. Incorrect: Although this example would work today, it’s possible that a vin attri-
bute could be introduced by a future version of HTML that would cause a conflict.
B. Incorrect: You cannot use the id attribute as an expando attribute because the id
attribute is already defined by the HTML5 specification to provide a unique identi-
fier to an element.
C. Correct: This is a properly defined expando attribute that will not conflict with
attributes introduced by future versions of HTML because the attribute name is
prefixed with “data-“ as required by the HTML specification.
D. Incorrect: Although this example would work today, it’s possible that a vin attri-
bute could be introduced by a future version of HTML that would cause a conflict. - Correct answer: A
A. Correct: HTML5 is preceded by and derived from HTML 4.01.
B. Incorrect: Although HTML’s root is SGML, which means that HTML5 is derived
from SGML, HTML5 is preceded by HTML 4.01.
C. Incorrect: Although XHTML 1.0 was released after HTML 4.01, HTML5 does not
inherit from XHTML1.0.
D. Incorrect: Although XHTML1.0 inherits from XML, HTML5 does not. - Correct answer: D
A. Incorrect: The element is the root element for your HTML5 document, but
it should be listed after you indicate the document type to the browser.
B. Incorrect: The tag must be contained within the element, so it
cannot be located at the beginning of the HTML5 document.
C. Incorrect: Thetag must be contained within the element, so it can-
not be located at the beginning of the HTML5 document.
D. Correct: The <!DOCTYPE html> indicates to the browser that this is an HTML5
document. - Correct answers: A, B, and D
A. Correct: The use of disabled by itself, with no value, is the minimized method for
implementing Boolean attributes.
B. Correct: The use of disabled with an empty value is one way to implement Boolean
attributes by using quoted form.