CSS Online Question

What does CSS stand for? (A) Creative Style Sheets (B) Cascading Style Sheets (C) Colorful Style Sheets (D) Computer Style Sheets

What is the correct HTML for referring to an external style sheet? (A) <link rel="stylesheet" type="text/css" href="mystyle.css"> (B) <stylesheet>mystyle.css</stylesheet> (C) <style src="mystyle.css">

Where in an HTML document is the correct place to refer to an external style sheet? (A) In the <body> section (B) At the end of the document (C) In the <head> section

Which HTML tag is used to define an internal style sheet? (A) <style> (B) <css> (C) <script>

Which HTML attribute is used to define inline styles? (A) font (B) class (C) style (D) styles

Which is the correct CSS syntax? (A) body {color: black;} (B) {body;color:black;} (C) body:color=black; (D) {body:color=black;}

How do you insert a comment in a CSS file? (A) /* this is a comment */ (B) ' this is a comment (C) // this is a comment // (D) // this is a comment

Which property is used to change the background color? (A) bgcolor (B) background-color (C) color

How do you add a background color for all <h1> elements? (A) h1 {background-color:#FFFFFF;} (B) all.h1 {background-color:#FFFFFF;} (C) h1.all {background-color:#FFFFFF;}

Which CSS property is used to change the text color of an element? (A) text-color (B) color (C) fgcolor

CSS Online Question

Which CSS property controls the text size? (A) font-style (B) text-size (C) font-size (D) text-style

What is the correct CSS syntax for making all the <p> elements bold? (A) p {font-weight:bold;} (B) <p style="font-size:bold;"> (C) p {text-size:bold;} (D) <p style="text-size:bold;">

How do you display hyperlinks without an underline? (A) a {text-decoration:no-underline;} (B) a {text-decoration:none;} (C) a {underline:none;} (D) a {decoration:no-underline;}

How do you make each word in a text start with a capital letter? (A) You can't do that with CSS (B) text-transform:capitalize (C) text-style:capitalize (D) transform:capitalize

Which property is used to change the font of an element? (A) font-family (B) font-weight (C) font-style

How do you make the text bold? (A) font:bold; (B) style:bold; (C) 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? (A) border-width:5px 20px 10px 1px; (B) border-width:10px 1px 5px 20px; (C) border-width:10px 20px 5px 1px; (D) border-width:10px 5px 20px 1px;

Which property is used to change the left margin of an element? (A) indent (B) padding-left (C) margin-left

When using the padding property; are you allowed to use negative values? (A) No (B) Yes

How do you make a list that lists its items with squares? (A) list: square; (B) list-type: square; (C) list-style-type: square;

CSS Online Question

How do you select an element with id 'demo'? (A) demo (B) *demo (C) #demo (D) .demo

How do you select elements with class name 'test'? (A) #test (B) .test (C) *test (D) test

How do you select all p elements inside a div element? (A) div + p (B) div p (C) div.p

How do you group selectors? (A) Separate each selector with a comma (B) Separate each selector with a plus sign (C) Separate each selector with a space

What is the default value of the position property? (A) absolute (B) relative (C) static (D) fixed