You are on page 1of 4

MM2213 (Intermediate Web Design) Quiz Week 2

Winter 2011

Name:

1 a. What advantages do websites designed with CSS layout have over websites
designed with a table layout?

Tables "break" on various browsers (newer and older versions) thus producing layout
dysfunctions.

Accessability--When creating CSS-based web sites the content flows logically without
disruption.

Keeps the HTMl/text ratio low

1 b. What advantages do websites designed with a table layout have over websites
designed with CSS layout?

They're easy to use and implement.

WYSIWYG editors like Frontpage and Dreamweaver make it very easy for developers

Faster rendering, typically

2. Regarding a browser, what is "quirks mode?"

Quirks Mode is a mode of operation of web browsers such as Internet Explorer (IE), Firefox, and Opera.
Basically, Quirks Mode (also called Compatibility Mode) means that a relatively modern browser
in-ten-tio-nal-ly simulates many bugs in older browsers, especially IE 4 and IE 5.

3. Why are selectors important in CSS markup?

Selectors are used to target specific elements, such as a paragraph, ID, or class.
MM2213 (Intermediate Web Design) Quiz Week 2
Winter 2011

4. Check the box if each of the below is a valid selector in CSS 2.0: (ALL TRUE)

*
p
 div p
 div,p
 #news
 .story
 a:focus
 textarea:focus
 nav>li
 nav + p
 p:first-letter
 p:after

5. When referring to CSS, what is the difference between "inheritance" and "cascade"?

Inheritance is about how properties trickle down from an element to it's children.

The cascade is about what take precedence when there is a conflict

6. What is the order of "specificity" in a CSS cascade from highest (1) to lowest (5)?

Type selector 4

Inherited style 1

Class selector 3

Inline style 5

ID selector 2
MM2213 (Intermediate Web Design) Quiz Week 2
Winter 2011

7a. Using CSS rules between <style> tags is not a sensible way to apply styles to an (X)HTML
document. Why not?

If you want to create another page using the same styles, you would have to duplicate the CSS on the new
page. If you then wanted to change a style, you would have to do it in two places rather than one.

7b. Write two ways to import a style sheet (filename is /css/style.css) into an (X)HTML
document.

<link href="/css/ style.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
@import url("/css/style.css");
-->
</style>

8. The proper way to make comments in CSS code is as follows:


<!-- This is a comment -->
 True
 False FALSE

9. What does a "CSS reset" attempt to do?

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line
heights, margins, font sizes of headings, and so on.

10. How do you "optimize" a stylesheet?

remove comments and strip out whitespace, helping to shave off a few extra bytes from your code.
MM2213 (Intermediate Web Design) Quiz Week 2
Winter 2011

You might also like