COM271, Week 4
Typography and the Box Model
Syllabus | Table of Pages | Assignments | References and Useful Links
←Review, Week 3 |
Review, Week 5→
Answer these questions by reviewing the notes for week 4. Hand in at beginning of class, week 5.
- What is the CSS attribute to choose a font family?
- What determines whether a user's browser displays the font family that I choose in my style sheet?
- For these rules, what pixel size is my paragraph font?
body{font:16px arial, helvetica, sans-serif;}
p{font-size:1.5em;} - Write a single rule to make links inside my div for navigation appear with arial font, 14px, right-justified, and with 5 pixels padding on top and bottom, 7 pixels on the right, and no underlining.
- Write four rules, all doing the same thing: to color all of my paragraph text medium grey.
- Write a rule to start an ordered list with a lower-case "a" marker.
- Write a rule to make links inside a table cell identified as "navigate" turn red (text color) with a green background whenever a user hovers a mouse over them.
- What rule would cause the list items in an unordered list to have no marker?
This code is used for the next 2 questions:
<style>
h1{margin:10px 5px;padding:3px 5px 5px 7px;border:3px inset #f93;}
p#first{margin:5px 5px 2em 15px;padding:5px;border:1px solid red;}
img.pix1 {float:left;margin:15px 10px 15px;}
</style>
...
<h1>Bob's Auto Mart</h1>
<p id="first" style="margin:15px">This week's
<img class="pix1" src="images/sales.jpg" /> specials:</p> - How much vertical space is there between the content areas of the paragraph and the header?
- How much horizontal space is there between the image and the content of the paragraph?
These questions are worth one point each. Grades for each question are 0 or 1 (no partial credit). Total points this review: 10. At the end of the course, total points will be added, divided by 100, and that fraction will be applied to 20% of your grade (maximum points from reviews is 20% of grade). See Assignments and Grading.