CCS Quiz | Cascading Style Sheets

CCS Quiz | Cascading Style Sheets




CCS Quiz contain set of 10 MCQ questions for Cascading Style Sheets MCQ which will help you to clear beginner level quiz.



1.      What does CSS stand for?

    1. Creative Style Sheets
    2. Computer Style Sheets
    3. Colorful Style Sheets
    4. Cascading Style Sheets

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

    1. <stylesheet>mystyle.css</stylesheet>
    2. <style src=”mystyle.css”>
    3. <link rel=”stylesheet” type=”text/css” href=”mystyle.css”>

 
3.      5. Which HTML attribute is used to define inline styles?

    1. style
    2. font
    3. class
    4. styles

 
4.      How do you add a background color for all <h1> elements?

    1. h1 {background-color:#FFFFFF;}
    2. all.h1 {background-color:#FFFFFF;}
    3. h1.all {background-color:#FFFFFF;}

 
5.      What is the correct CSS syntax for making all the <p> elements bold?

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

 
6.      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;}

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

    1. You can’t do that with CSS
    2. text-transform:capitalize
    3. text-transform:uppercase

8.      Which property is used to change the font of an element?

    1. font
    2. Both font-family and font can be used
    3. font-family

 
9. 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:5px 20px 10px 1px;
2. border-width:10px 5px 20px 1px;
3. border-width:10px 20px 5px 1px;
4. border-width:10px 1px 5px 20px;
 
10.  How do you select all p elements inside a div element?

    1. div + p
    2. div.p
    3. div p

 
11.  How do you group selectors?

    1. Separate each selector with a comma
    2. Separate each selector with a space
    3. Separate each selector with a plus sign