Test Your Knowledge

  1. Which directive do you use to import one style sheet into another (or into the <style> section of some HTML)?

  2. What HTML tag can you use to import a style sheet into a document?

  3. Which HTML tag attribute is used to directly embed a style into an element?

  4. What is the difference between a CSS ID and a CSS class?

  5. Which characters are used to prefix a) IDs and b) class names in a CSS rule?

  6. In CSS rules, what is the purpose of the semicolon?

  7. How can you add a comment to a style sheet?

  8. Which character is used by CSS to represent “any element”?

  9. How can you select a group of different elements and/or element types in CSS?

  10. How can you make one CSS rule of a pair with equal precedence have greater precedence over the other one?

See Chapter 18 Answers in Appendix A for the answers to these questions.

Get Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.