Styling Syntax and Theory
TOTAL POINTS 13
1.Question 1
Which of the following is not an option for specifying a color in CSS3?
Use a hexadecimal value
Use the color name
All of these options are valid.
1 point
2.Question 2
If your body tag uses the style attribute style="text-align:center", you can overwrite that
property by using the CSS3 rule.
1
2
3
body{
text-align: left;
}
False
1 point
3.Question 3
What is wrong with the following code?
1
2
3
4
5
body{
color: #000000;
background-color:#FFFFFF
font-family: Times, Arial, Cursive;
}
There is a missing semicolon
You can't style three properties in a single rule
This is a valid rule
1 point
4.Question 4
Assume the following rule is the only one that styles the body element:
1
2
3
body{
font-family: Cursive, Helvetica, Verdana;
}
What happens if the browser doesn't support any of these font families?
The text will be displayed in the default browser font-family
The text will be displayed in Cursive
1 point
5.Question 5
The browser defaults override rules specified in an external style sheets.
False
1 point
6.Question 6
Using the code below, will the body of the page have the background-color defined in the file
style.css or the background color define in the <style> tag?
1
2
3
4
5
6
7
8
9
10
<head>
<meta charset = "UTF-8">
<title>Test code</title>
<link rel "stylesheet" href = "style.css">
<style>
body{
background-color: #44CCDD;
}
</style>
</head>
<style>
1 point
7.Question 7
Internal styling (rules specified in the <head> section) override rules specified with the style
attribute in a tag.
False
1 point
8.Question 8
The default display value for paragraphs is:
block
inline-block
inline
none
1 point
9.Question 9
The default display value for <span> is:
inline-block
none
inline
1 point
10.Question 10
A block element takes up the full width of it's parent, even if the content is smaller than the
parent. So two block elements at the same will not be side-by-side.
True
1 point
11.Question 11
Inline elements take up the full width of the browser, even if the content is smaller than the
browser size.
False
1 point
12.Question 12
Which CSS3 property is used to center text? (Only provide the property name; do not give it a
value.)
align
text-center
text-align
1 point
13.Question 13
Which of the following is the best way to convey that your text has special meaning?
Using semantic tags in addition to color and/or font.
Using colors to signify the important text
Using a combination of font size and color to signify the important text
4.Question 4
Assume the following rule is the only one that styles the body element:
1
2
3
body{
font-family: Cursive, Helvetica, Verdana;
}
What happens if the browser doesn't support Cursive or Helvetica?
The text will be displayed in Cursive
The text will not be displayed
The text will be displayed in Verdana
12. Which CSS3 property is used to center text? (Provide on the property, not the value!)
text-align
The default display value for <a> element is:
none
inline-block
block
inline