CSS Questions & Answers – CSS Outline

This set of CSS Multiple Choice Questions & Answers (MCQs) focuses on “CSS Outline”.

1. Which of the following property is used to draw a line around elements outside the borders?
a) line
b) padding
c) outline
d) border
View Answer

Answer: c
Explanation: Outlines do not take up space, they are drawn above the content.

2. Choose the option that correctly specifies the output of the following CSS.

span {
	border: 1px solid red;
        outline: green dotted thick;
}

a) All span elements will have a red border and a green dotted outline
b) All span elements will have a green thick border and a red outline
c) All span elements will have an outer red border and inner green dotted border
d) All span elements will have a outer green dotted border and an inner red border
View Answer

Answer: d
Explanation: The border property creates the inner border, while the outline sets the outer border.
advertisement
advertisement

3. Which of the following property specifies the color of an outline?
a) color-outline
b) outline-color
c) outline-style-color
d) none of the mentioned
View Answer

Answer: b
Explanation: As the property name specifies, it sets the color of the outline to the provided value.
Note: Join free Sanfoundry classes at Telegram or Youtube

4. Identify the outline property that specifies the amount of area extended beyond the border box.
a) outset3d
b) inset
c) outset
d) inset3d
View Answer

Answer: c
Explanation: It specifies a 3D outset border. The effect depends on the border-color value.

5. Which of the following value specifies a dashed outline?
a) dash
b) dashed
c) double-dash
d) all of the mentioned
View Answer

Answer: b
Explanation: The property defines a dashed border.
advertisement

6. Which of the following property specifies the look and design of an outline?
a) outline-font
b) outline-style
c) outline-format
d) none of the mentioned
View Answer

Answer: b
Explanation: The outline-style CSS property is used to set the style of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.

7. Which of the following values specifies a 3D grooved outline?
a) initial
b) ridge
c) groove
d) groove3d
View Answer

Answer: c
Explanation: groove specifies a 3D grooved border. The effect depends on the border-color value.
advertisement

8. Select the output of the following CSS.

div {
    border-width:5px;	
    border-style:dotted solid double dashed;
}

a) Box having dotted top outline, solid right outline, double bottom outline and dashed left outline
b) Box having dotted top outline, solid left outline, double bottom outline and dashed right outline
c) Box having dotted bottom outline, solid right outline, double top outline and dashed left outline
d) Box having dotted bottom outline, solid left outline, double top outline and dashed left outline
View Answer

Answer: a
Explanation: The shorthand run in clockwise direction.

9. Which of the following specifies the width of an outline?
a) outline-size
b) outline-width
c) outline-height
d) both outline-size and outline-width
View Answer

Answer: b
Explanation: The outline-width CSS property is used to set the width of the outline of an element.

10. Which of the following value specifies a solid outline?
a) bold
b) rock
c) solid
d) dashed
View Answer

Answer: c
Explanation: As the name suggests, a solid outline is created using this value.

Sanfoundry Global Education & Learning Series – CSS.

To practice all areas of CSS, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.