CSS Styling Properties and Selectors

Test your knowledge of CSS styling properties including text formatting, borders, margins, padding, lists, and integrating CSS with HTML

13 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the correct CSS syntax for making all the

elements bold?

  1. p {text-size:bold}
  2. p {font-weight:bold}
  3. style:bold
  4. p{font:bold}
Question 2 Multiple Choice (Single Answer)

How do you display hyperlinks without an underline?

  1. a {decoration:no underline}
  2. a {text-decoration:no underline}
  3. a {underline:none}
  4. a {text-decoration:none}
Question 3 Multiple Choice (Single Answer)

How do you make each word in a text start with a capital letter?

  1. text-transform:uppercase
  2. text-transform:capitalize
  3. You can't do that with CSS
Question 4 Multiple Choice (Single Answer)

How do you change the font of an element?

  1. fon-face:
  2. font-family:
  3. f:
  4. font-style:
Question 5 Multiple Choice (Single Answer)

How do you make the text bold?

  1. font:b
  2. style:bold
  3. font-weight:bold
Question 6 Multiple Choice (Single Answer)

How do you display a border like this: The top border = 10 pixels, The bottom border = 5 pixels, The left border = 20 pixels, The right border = 1pixel?

  1. border-width:10px 20px 5px 1px
  2. border-width:10px 1px 5px 20px
  3. border-width:10px 5px 20px 1px
  4. border-width:5px 20px 10px 1px
Question 7 Multiple Choice (Single Answer)

How do you change the left margin of an element?

  1. padding:
  2. indent:
  3. margin:
  4. text-indent:
  5. margin-left:
Question 8 Multiple Choice (Single Answer)

To define the space between the element's border and content, you use the padding property, but are you allowed to use negative values?

  1. Yes
  2. No
Question 9 Multiple Choice (Single Answer)

How do you make a list that lists its items with squares?

  1. type: square
  2. list-style-type: square
  3. list-type: square
  4. style-list: square
Question 10 Multiple Choice (Single Answer)

What is the correct HTML for referring to an external style sheet?

  1. <link rel="stylesheet" type="text/css" href="mainstyle.css">
  2. <style src="mainstyle.css">
  3. <stylesheet>mainstyle.css</stylesheet>
  4. <link url="stylesheet" type="text/css" href="mainstyle.css">
Question 11 Multiple Choice (Single Answer)

Which HTML tag is used to define an internal style sheet?

  1. <script>
  2. <css>
  3. <stylesheet>
  4. <style>
Question 12 Multiple Choice (Single Answer)

Which HTML attribute is used to define inline styles?

  1. styles
  2. class
  3. font
  4. style
Question 13 Multiple Choice (Single Answer)

What is the correct CSS syntax for making all the

elements bold?

  1. p {font-weight:bold}
  2. p {text-size:bold}
  3. <p style="text-size:bold">
  4. <p style="font-size:bold">