WebTech University CSS Exam Note: All questions and answers are based on the correct implementation of CSS according to the specifications and assume that browsers obey these rules. Make no allowance in your answers for browser peculiarities. 1. What does CSS stand for? Cascading Style Sheets 2. What are the 2 main parts of a CSS rule? The selector and the declaration 3. There are 3 distinct ways of applying a CSS rule to items on a web page. One of them is setting a rule for an HTML element, what are the other 2? (Not the same answer as for question 9 - think about this question - think selectors). (Question 3 - good try - the answer is class and ID. - note from instructor) a. (listed above) setting a rule for an HTML element (as for p, h1, body) b. creating CSS class styles (.mysettings, .grusome) c. setting up link styles (a:link, a:active) The last two can be combined. (Hope I understood this question correctly!) 4. If I define a CSS rule for fonts for the body tag, does text in a

or table cell inherit the rule properties, or do I have to set specific rules for the

tag and the tag? Rules for color, family, and size are inherited. Specific rules need be set only for changes. 5. When it comes to the CSS box, what comes closest to the box content - the border, the padding or the margins? padding 6. With this rule - .border {border: 1px solid black; border-width: 0 0 2px 0;} On which side will the 2 pixel border appear? On the bottom 7. For setting font sizes, what are the 3 recommended unit measurements that you can use? pixels, ems, and percentages 8. Is it possible to have more than one set of link styles on a page? yes, as we did in the page in Lesson 4 with the two sets of links 9. There are 3 ways of "attaching" your styles to a page, one of them is "inline" and not recommended, what are the other 2 ways that you have used in these lessons? The second is to declare the styles in the head of the page. The third is to have the styles in a separate file, which is then linked to each page using those styles. 10. There are several ways that you can control the repeating behaviour of a background graphic. One of these is - background: repeat What are 2 others? a. background: repeat (as listed above, which is the default and repeats the image both horizontally and vertically) b. background: repeat-x (which repeats the image across the top of the page - horizontally) c. background: repeat-y (which repeats the image down the left side of the page - vertically) d. background: no-repeat (which means the image is not repeated)