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.) <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?