Week 2 Answers
Week 2 Answers
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.
1 b. What advantages do websites designed with a table layout have over websites
designed with CSS layout?
WYSIWYG editors like Frontpage and Dreamweaver make it very easy for developers
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.
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.
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.
<style type="text/css">
<!--
@import url("/css/style.css");
-->
</style>
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.
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