CSS Assessment
How do you select an element with id "demo"? a) #demo b) .demo c) demo d) *demo
#demo
Where in the HTML document is the correct location to insert code to link to your external CSS? a) In the <head> section b) In the <body> section c) At the very end of the document d) At the very beginning of the document
a) In the <head> section
You should always define a backup font-family in CSS. a) True b) False
a) True
Which CSS code is incorrect? a) a {color: blue;} b) p {font-size: 10px;} c) body {backgroundcolor="red";} d) img {width: 100%;}
c) body {backgroundcolor="red";}
Which is correct CSS syntax? a) { body; color=black;} b) body: color= black c) body {color:black;} d) (body color is black)
c) body {color:black;}
Which is the correct way to format a Font Family for a paragraph? a) p { font-face: Arial; } b) p { family-font: Arial; } c) p { font-family: Arial; } d) p { font: Arial; }
c) p { font-family: Arial; }
Which is the Value in the CSS? p {color: red;} a) p b) color c) red d) {}
c) red
Which is the value in this CSS? p {color: red;} a) p b) color c) red
c) red
Which HTML attribute is used to define inline styles? a) font b) styles c) style d) class
c) style
How do you make each word in a text start with a capital letter? a) text-transform:capitalize b) You can't do that with CSS c) text-transform:uppercase d) text-transform:lowercase
c) text-transform:uppercase
What symbols go around the properties for each CSS selector? a) < > b) [ ] c) { } d) ( )
c) { }
How do you group selectors? a) Separate each selector with a comma b) Separate each selector with a space c) Separate each selector with a plus sign d) You cannot do that
a) Separate each selector with a comma
Which is the selector for a link? a) a { } b) link { } c) href { } d) a href { }
a) a { }
Select the code below that uses CSS to configure a background color of #000000 for a web page. a) body { background-color: #000000; } b) body { bgcolor: #000000; } c) document { background-page: #000000; } d) None of these
a) body { background-color: #000000; }
Which HTML tag is used to define an internal style sheet? a) <script> b) <style> c) <css> d) <stylesheet>
b) <style>
What does CSS stand for? a) Creative Style Sheets b) Cascading Style Sheets c) Colorful Style Spread d) Computer Style Spread
b) Cascading Style Sheets
How do I remove the underline from a link using CSS? a) a {underline: none;} b) a {text-decoration: none;} c) a {style: none;} d) link {underline: none;}
b) a {text-decoration: none;}
How do you select elements with class name "test"? a) #test b) test c) *test d) .test
d) .test
What unit of measurement does CSS use for size? a) px b) em c) % d) All work
d) All work
A selector (ex: h1{ } ) can only have 1 property a) true b) false
b) false
What is the correct HTML for referring to an external style sheet? a) <link rel="stylesheet" type="text/css" href="mystyle.css"> b) <style src="mystyle.css"> c) <stylesheet>mystyle.css</stylesheet> d) <stylesheet mystyle.css> </stylesheet>
a) <link rel="stylesheet" type="text/css" href="mystyle.css">
What property changes the border for an image/table? a) border: b) border-size: c) border-color: d) border-change
a) border:
Which CSS code is buggy? a) link {color: blue;} b) li {background-color: red;} c) p {font-size: 10px;} d) img {width: 100%;}
a) link {color: blue;}
Which is the selector in this CSS? p {color: red;} a) p b) color c) red d) ;
a) p
Which is the correct way to specify the color of a paragraph of text? a) p { color:#ff0000; } b) p { text-color:#ff0000; } c) p { font-color: #ff0000; } d) p { font-text-color: #ff0000; }
a) p { color:#ff0000; }
Which is the property in this CSS? p {color: red;} a) p b) color c) red d) :
b) color
Which is the correct way to format a Font Family for a paragraph? (Hint: make sure you have more than one backup font!) a) p { font-face: Arial, Verdana, San-Serif; } b) p { font-family: Arial, Verdana, San-Serif; } c) p { family-font: Arial, Verdana, San-Serif;} d) p { font: Arial, Verdana, SanSerif;}
b) p { font-family: Arial, Verdana, San-Serif; }
Which CSS code centers text? a) p {align: center;} b) p {text-align: center;} c) p {align=center;} d) p {center;}
b) p {text-align: center;}
If you want to have more than one declaration in a CSS rule, what character separates them? a) comma , b) semi-colon ; c) colon : d) period .
b) semi-colon ;
The code for the comment tag in CSS is a) <!-- comment --> b) <!-- comment > c) /* comment /* d) /* comment */
d) /* comment */*