Week #8 Review Questions


1. The style rule p { left-margin: 2em; }sets the left margin for the paragraph element to 2em.
True

2. How would I write code to set the white spaces between words to 3em? Remember that browsers have default spacing.
body { word-spacing: 2em; }

3. Which of the following properly tiles an image across the entire background of the Web page?
1. body { background: url(bluetile.jpg) repeat; }

4. Which of the following correctly sets the element's position property to absolute and offsets it from the top of the page by 140 pixels?
4. position: absolute; top: 140px;

5. You have been asked to give a presentation at a conference. Your visual presentation is in the form of a website that is projected onto a screen. You are also quite sure that some of those present will want a printed copy of the document. You want to create a presentation that is projected with Arial font, colourful headings and a largish font size. But, for the print version, you would rather the material be optimized for black ink and in a serif (Times New Roman) font at a suitable size for print (10/12 points). Please create a stylesheet that would accomplish this.

<style type="text/css; charset=utf-80">
       <!--
         @media projection {
            body { 
              font: 16pt Arial, sans-serif;
              color: colorful;   /*   ;D    */
              background-color: inherit;
           }
        }
        @media print {
          body {
             font: 12pt "Times New Roman", serif;
             color: black;
             background-color: white;
          }
       }
       -->
     </style>

6. You are creating an instructional website. There is a strong possibility that several people accessing your site have visual impairments. What strategy could you use - assuming that they will be using adaptive technology (screen reader, screen reading browser)?
Create alternate stylesheets, for example with a larger font, or with a media type of "aural."


Challenge Questions (optional)

1. You can find some help for question #1a and #1b here: http://www.w3.org/TR/REC-CSS2/cascade.html#at-import. (These questions are also covered in your text.)

1. Where should you place the @import notation?
In the <style> section of the document head, before all other CSS rules.

2. What order will a linked style sheet cascade in?
Linked styles will supercede default styles, but will be superceded by embedded styles

2. If you use a percentage value for margin and padding, the percentage is based on the:
3. width of the box

3. What are the ten media types for CSS?
I can only come up with nine:
Aural, braille, embossed, handheld, print, projection, screen, tty, tv.
Does "all" count?

Valid HTML 4.01 Transitional