CSS Styling Properties and Selectors
Test your knowledge of CSS styling properties including text formatting, borders, margins, padding, lists, and integrating CSS with HTML
Questions
What is the correct CSS syntax for making all the
elements bold?
- p {text-size:bold}
- p {font-weight:bold}
- style:bold
- p{font:bold}
How do you display hyperlinks without an underline?
- a {decoration:no underline}
- a {text-decoration:no underline}
- a {underline:none}
- a {text-decoration:none}
How do you make each word in a text start with a capital letter?
- text-transform:uppercase
- text-transform:capitalize
- You can't do that with CSS
How do you change the font of an element?
- fon-face:
- font-family:
- f:
- font-style:
How do you make the text bold?
- font:b
- style:bold
- font-weight:bold
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?
- border-width:10px 20px 5px 1px
- border-width:10px 1px 5px 20px
- border-width:10px 5px 20px 1px
- border-width:5px 20px 10px 1px
How do you change the left margin of an element?
- padding:
- indent:
- margin:
- text-indent:
- margin-left:
To define the space between the element's border and content, you use the padding property, but are you allowed to use negative values?
- Yes
- No
How do you make a list that lists its items with squares?
- type: square
- list-style-type: square
- list-type: square
- style-list: square
What is the correct HTML for referring to an external style sheet?
- <link rel="stylesheet" type="text/css" href="mainstyle.css">
- <style src="mainstyle.css">
- <stylesheet>mainstyle.css</stylesheet>
- <link url="stylesheet" type="text/css" href="mainstyle.css">
Which HTML tag is used to define an internal style sheet?
- <script>
- <css>
- <stylesheet>
- <style>
Which HTML attribute is used to define inline styles?
- styles
- class
- font
- style
What is the correct CSS syntax for making all the
elements bold?
- p {font-weight:bold}
- p {text-size:bold}
- <p style="text-size:bold">
- <p style="font-size:bold">