A

Answers to Exercises

CHAPTER 1

  1. What are the key benefits of CSS?

    A. Benefits include:

    • Separation of styling from HTML with CSS enables the appearance of an entire site to be updated from a single file or set of files.
    • Using external CSS files, the styles for a site need only be downloaded once, instead of once for every page.
    • Users of a website can compose style sheets of their own, potentially making websites more accessible.
    • Support for multiple style sheets can enable a developer to provide more than one look for a website to users.
    • Style sheets allow content to be targeted towards specific devices, for example, printers or mobile phones.
  2. Name the five main web browsers used today.

    A. Internet Explorer, Firefox, Chrome, Safari and Opera.

  3. Which is the latest version of Internet Explorer?

    A. Internet Explorer 9.

CHAPTER 2

  1. Name the different components that make up a CSS rule?

    A. Rules are made up of selectors and declarations, and declarations are further made up of properties and values.

  2. What's the difference between when width: auto; is applied to a <table> as opposed to a <div> element?

    A. A <table> shrinks to fit its contents, a <div> expands to fill its container.

  3. Complete the sequence: Declaration, Property,

    A. Value.

  4. Convert the color RGB(234, 123, 45) to hexadecimal.

    A. #EA7B2D.

  5. What is the shortened hexadecimal notation of #FFFFFF?

    A. #FFF.

  6. If I have a style sheet located at www.example.com/stylesheet.css, and a web page located at www.example.com/index.html, what ...

Get Beginning CSS: Cascading Style Sheets for Web Design, Third 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.