Skip to content

Latest commit

 

History

History
146 lines (101 loc) · 3.21 KB

Styling-Syntax-and-Theory-quiz.md

File metadata and controls

146 lines (101 loc) · 3.21 KB

Styling Syntax and Theory

Question 1

Which of the following is not an option for specifying a color in CSS3?

1) hexadecimal
2) rgba
3) rgb
4) binary
5) color name

ANS: 4) binary


Question 2

If your body tag uses the style attribute style="text-align:center", you can overwrite that property by using the CSS3 rule.

body{
   text-align: left;
}

1) True
2) False

ANS: 2) False


Question 3

What is wrong with the following code?

body{
   color: #000000;
   background-color:#FFFFFF
   font-family: Times, Arial, Cursive;
}

1) There is a missing semicolon
2) You can't style three properties in a single rule
3) This is a valid rule

ANS: 1) There is a missing semicolon


Question 4

Assume the following rule is the only one that styles the body element:

body{
   font-family: Cursive, Helvetica, Verdana;
}

What happens if the browser doesn't support Cursive or Helvetica?

1) The text will not be displayed
2) The text will be displayed in Verdana
3) The text will be displayed in Cursive

ANS: 2) The text will be displayed in Verdana


Question 5

The browser defaults override rules specified in an external style sheets.

1) True
2) False

ANS: 2) False


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?

<head>
    <meta charset = "UTF-8">
    <title>Test code</title>
    <link rel "stylesheet" href = "style.css">
    <style>
        body{
            background-color: #44CCDD;
        }
    </style>
</head>

1) <style>
2) style.css

ANS: 1) <style>


Question 7

Internal styling (rules specified in the section) override rules specified with the style attribute in a tag.

1) True
2) False

ANS: 2) False


Question 8

The default display value for paragraphs is:

1) block
2) inline-block
3) inline
4) none

ANS: 1) block


Question 9

The default display value for is:

1) inline
2) none
3) inline-block
4) block

ANS: 1) inline


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.

1) True
2) False

ANS: 1) True


Question 11

Inline elements take up the full width of the browser, even if the content is smaller than the browser size.

1) True
2) False

ANS: 2) False


Question 12

Which CSS3 property is used to center text? (Provide on the property, not the value!)

text-align

Question 13

Which of the following is the best way to convey that your text has special meaning?

1) Using colors to signify the important text
2) Using semantic tags in addition to color and/or font.
3) Using a combination of font size and color to signify the important text
4) Using a larger font size to signify the important text  

ANS: 2) Using semantic tags in addition to color and/or font.