Quiz 2 worksheet - Computer Programming Via Web | CMSC 198N, Quizzes of Computer Science

Material Type: Quiz; Professor: Padua-Perez; Class: INTRO COMP PROG VIA WEB; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;

Typology: Quizzes

Pre 2010

Uploaded on 02/13/2009

koofers-user-810
koofers-user-810 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMSC 198N Quiz 2 Worksheet
The second quiz for the course will be on Friday, Feb 15 at the beginning of the class (2:00
pm). The following list provides more information about the quiz:
The quiz will be a written quiz (no computer).
Closed book, closed notes quiz.
Answers must be neat and legible. We recommend that you use pencil and eraser.
The following exercises cover the material to be included in this quiz. Solutions to these
exercises will not be provided, but you are welcome to discuss your solutions with the TA or
instructor during office hours. For this quiz you should only be familiar with the following CSS
properties and pseudo-classes: color, font-size (using em for size), a:link, a:visited, a:hover,
a:active, font-style (italics), background-color, and font-weight.
Exercises
1. Define a css rule that makes all paragraphs text red.
2. Define a css rule that makes a link blue (when it has not been selected) and purple
once it has been selected.
3. An html file has a div tag as follows:
<div id=contents>
House is really nice
</div>
Define a css rule using id selectors that defines the background of the contents area to
be blue.
4. An html file has a div tag as follows:
<div class=”importantSection”>
Projects need to be submitted today.
</div>
Define a css rule using class selectors that defines the font of the div area to be twice
the default font size and makes the text appear in yellow and in italics.
5. What is the difference between an id selector and a class selector?
6. What do you need to add to an html file so we can have several style sheets
associated with the document?
7. What is a shorthand property?

Partial preview of the text

Download Quiz 2 worksheet - Computer Programming Via Web | CMSC 198N and more Quizzes Computer Science in PDF only on Docsity!

CMSC 198N Quiz 2 Worksheet

The second quiz for the course will be on Friday, Feb 15 at the beginning of the class (2: pm). The following list provides more information about the quiz:

 The quiz will be a written quiz (no computer).  Closed book, closed notes quiz.  Answers must be neat and legible. We recommend that you use pencil and eraser.

The following exercises cover the material to be included in this quiz. Solutions to these exercises will not be provided, but you are welcome to discuss your solutions with the TA or instructor during office hours. For this quiz you should only be familiar with the following CSS properties and pseudo-classes: color, font-size (using em for size), a:link, a:visited, a:hover, a:active, font-style (italics), background-color, and font-weight.

Exercises

  1. Define a css rule that makes all paragraph’s text red.
  2. Define a css rule that makes a link blue (when it has not been selected) and purple once it has been selected.
  3. An html file has a div tag as follows:
    House is really nice

Define a css rule using id selectors that defines the background of the contents area to be blue.

  1. An html file has a div tag as follows:
    Projects need to be submitted today.

Define a css rule using class selectors that defines the font of the div area to be twice the default font size and makes the text appear in yellow and in italics.

  1. What is the difference between an id selector and a class selector?
  2. What do you need to add to an html file so we can have several style sheets associated with the document?
  3. What is a shorthand property?