Quiz Of CSS

1. What is the meaning of CSS?

Chicken Salad Sandwich
Cascading Style Sheet
Central Security Service
Cold Shrimp Salad

2. Which tag will you use to add style on your website?

<css></css>
<color></color>
<style></style>
<head></head>

3. How will you add blue color to all paragraph tags?</p><p>Hint: write four parts of a style rule

p{ blue: color }
p{ color = blue }
p{ color : blue; }
p{ text: “blue”; }

4. <span style="background-color: transparent; color: rgb(0, 0, 0);">How would you set a purple background color to an element?</span>

color:purple;
background color:purple;
background-color:purple;
backgroundColor:purple;

5. How to set the width of all paragraph tags as half of the available width? </p><p>Hint: think about the total width as a percent and then think about the half of the width

p{ width: 1/2 }
p{ width: 50%; }
p{ width: 0.5; }
p{ width: half; }

6. Which one is not true?

The value of multiple ID attributes has to be unique
Use ID to style a specific HTML element
Same ID should be used in different HTML tags

7. How can we add multiple classes to an HTML element?

Separate class names by a whitespace
Separate class names by a comma
You cannot apply more than one class name
Use id

8. How many values a margin style rule cannot have?

One
Two
Seven
Four