Lesson 1: Introducing HTML5 CHAPTER 2 43
■■HTML entities are special characters and can be embedded in your HTML document
by using the ampersand (&), the entity name, and a semicolon (;). You can also use the
ampersand (&), the hash symbol (#), the entity number, and the semicolon (;).
■■Nonbreaking spaces can be used to render several contiguous spaces. You can also use
nonbreaking spaces to keep two words from being separated by a line break.
■■The id attribute specifies a unique identifier for an element.
Lesson review
Answer the following questions to test your knowledge of the information in this lesson. You
can find the answers to these questions and explanations of why each answer choice is correct
or incorrect in the “Answers” section at the end of this chapter.
- You want to create an expando attribute on several
tags that display vehicles for
sale. The expando attribute will store the VIN (vehicle identification number) of the
vehicle for sale. Which of the following is the most appropriate example of creating the
expando attribute?
A. <h3 vin=’current VIN here’>1965 VW Beetle
B. <h3 id=’current VIN here’>1965 VW Beetle
C. <h3 data-vin=’current VIN here’>1965 VW Beetle
D. <h3 datavin=’current VIN here’>1965 VW Beetle - Which technology is HTML5 preceded by and derived from?
A. HTML 4.01
B. SGML
C. XHTML 1.0
D. XML - How should you start each HTML5 document?
A.
B.
C.
D. <!DOCTYPE html> - You want to use the disabled Boolean attribute on a text box. How can you accomplish
this? (Choose all that apply.)
A.
B.
C.
D.