CSCI 2910 Cascading Style Sheets Quiz - Spring 2007 - Prof. David L. Tarnoff, Quizzes of Computer Science

A csci 2910 quiz focusing on cascading style sheets (css) for the spring semester of 2007. The quiz includes html code with embedded css and questions related to css selectors and colors.

Typology: Quizzes

Pre 2010

Uploaded on 08/18/2009

koofers-user-6dp
koofers-user-6dp ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Name: ________________________________
CSCI 2910 Cascading Style Sheet Quiz โ€“ Spring 2007
For questions 1 through 5, use the following piece of HTML code.
(Sorry about it being non-XHTML compliant. Just trying to save space.)
<html><head>
<style type="text/css"><!--
h1 {color: cyan;}
h1 {color: blue;}
p b {color: black;}
b {color: lime;}
p {color: purple;}
p.note {color: green;}
span {color: red;}
--></style>
</head>
<body>
<h1>A hopeful thought</h1>
<p>We're just <b>writing</b> some code here in order to
<span>test</span> this stellar class of students.</p>
<p class="note">I hope that Tarnoff has <span style="color:
coral">taught</span> you well enough to ace this.</p>
</body>
1. What color is the text "A hopeful thought"?
2. What color is the text "writing"?
3. What color is the text "in order to"?
4. What color is the text "test"?
5. What color is the text "Tarnoff"?
6. Name one of the three benefits discussed in class of style sheets.
7. Match the sample syntax shown on the left with the type of selector shown on the right. (Note: the
string "selector" in the pseudo-selector case needs to be replaced with a reserved word.)
p:news ๎š† ๎š† Class Attribute Selectors for use with class tag attribute
p.news ๎š† ๎š† ID Attribute Selectors for use with the id or name tag attribute
p#news ๎š† ๎š† Pseudo-Selectors to define styles of things such as first line
8. True or false: Several contextual selectors can be grouped together using commas such as:
p em, h1 em {font-weight: bold; color: blue}
9. Which method of accessing an external style sheet is preferred for browser compatibility, the link tag
or the @import command?

Partial preview of the text

Download CSCI 2910 Cascading Style Sheets Quiz - Spring 2007 - Prof. David L. Tarnoff and more Quizzes Computer Science in PDF only on Docsity!

Name: ________________________________

CSCI 2910 Cascading Style Sheet Quiz โ€“ Spring 2007

For questions 1 through 5, use the following piece of HTML code. (Sorry about it being non-XHTML compliant. Just trying to save space.)

A hopeful thought

We're just writing some code here in order to test this stellar class of students.

I hope that Tarnoff has taught you well enough to ace this.

  1. What color is the text "A hopeful thought"?
  2. What color is the text "writing"?
  3. What color is the text "in order to"?
  4. What color is the text "test"?
  5. What color is the text "Tarnoff"?
  6. Name one of the three benefits discussed in class of style sheets.
  7. Match the sample syntax shown on the left with the type of selector shown on the right. (Note: the string "selector" in the pseudo-selector case needs to be replaced with a reserved word.)

p:news ย† ย† Class Attribute Selectors for use with class tag attribute

p.news ย† ย† ID Attribute Selectors for use with the id or name tag attribute

p#news ย† ย† Pseudo-Selectors to define styles of things such as first line

  1. True or false: Several contextual selectors can be grouped together using commas such as:

p em, h1 em {font-weight: bold; color: blue}

  1. Which method of accessing an external style sheet is preferred for browser compatibility, the link tag or the @import command?