This set of CSS Multiple Choice Questions & Answers (MCQs) focuses on “Applying Style to a Document”.
1. Which of the following is the correct way to applying style to a document?
a) Use an external style sheet, either by importing it or by linking to it
b) Directly embed a document-wide style in the head element of the document
c) Set an inline style rule using the style attribute directly on an element
d) All of the mentioned
View Answer
Explanation: None.
2. What will be the output of following code snippet?
<style h1 {color: green;}> <h1>Hello</h1>
a) h1 heading becomes green
b) error
c) h1 heading disappears
d) nothing happens
View Answer
Explanation: None.
3. What will be the output of below mentioned code snippet?
<p style="color: red">text</p>
a) make that specific paragraph red.
b) error
c) nothing happens
d) none of the mentioned
View Answer
Explanation: NOne.
4. The _______property is used to set the color of the text.
a) pallet
b) colour
c) color
d) text-decoration
View Answer
Explanation: None
5. Which of the following is the correct way to apply Styles?
a) inside an HTML element
b) inside the
c) in an external CSS file
d) all of the mentioned
View Answer
Explanation: None.
6. Which of the following CSS list properties is/are correct?
a) Set different list item markers for ordered lists
b) Set different list item markers for unordered lists
c) Set an image as the list item marker
d) All of the mentioned
View Answer
Explanation: None.
7. A ___________ is used to define a special state of an element.
a) pseudo-tag
b) pseudo-element
c) pseudo-id
d) pseudo-class
View Answer
Explanation: None.
8. The __________ property specifies the type of positioning method used for an element.
a) align
b) float
c) position
d) padding
View Answer
Explanation: None.
9. Which style is this?
<body style="background-color: lightcyan">
a) Inline Styles
b) External Style Sheet
c) External Style Sheettyle Sheet
d) None of the mentioned
View Answer
Explanation: None.
10. Is this correct way to apply css.State true or false.
<link rel="stylesheet" type="text/css" href="mystyle.css">
a) True
b) False
View Answer
Explanation: None.
Sanfoundry Global Education & Learning Series – CSS.
To practice all areas of CSS, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check Computer Science Books
- Check CSS Books
- Practice Computer Science MCQs
- Practice Information Science MCQs
- Practice HTML MCQ