CSS Questions & Answers – CSS border

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

1. Which of the following CSS property defines the different properties of all four sides of an element’s border in a single declaration?
a) border
b) padding
c) border-collapse
d) border-width
View Answer

Answer: d
Explanation: The border-width property sets the width of an element’s four borders. This property can have from one to four values.

2. Identify the CSS property defining bottom-left corner shape of the border?
a) border-radius
b) border-corner-radius
c) border-bottom-left-radius
d) border-left-radius
View Answer

Answer: c
Explanation: CSS3 border-radius property allows you can give any element “rounded corners”.

3. Select the CSS property that sets the width of an element’s bottom border?
a) border-width
b) border-bottom
c) border-width-down
d) border-bottom-width
View Answer

Answer: d
Explanation: The border-bottom-width CSS property sets the width of the bottom border of a box.
advertisement
advertisement

4. Which of the following CSS property border-color property sets the color of an element’s four borders?
a) border-background
b) border-background-color
c) border-color
d) all of the mentioned
View Answer

Answer: c
Explanation: The border-color property sets the color of an element’s four borders. This property can have from one to four values.

5. Choose the CSS property that can be used for collapsing the borders between table cells?
a) border
b) collapse-border
c) border-collapse
d) border-cell
View Answer

Answer: c
Explanation: The border-collapse property sets whether the table borders are collapsed into a single border or detached as in standard HTML.

6. Which CSS property can be used to set the image as border instead of the border style?
a) background-image
b) border-image
c) background-image-source
d) border-image-source
View Answer

Answer: d
Explanation: The border-image-source property specifies the path to the image to be used as a border (instead of the normal border around an element).

7. In how many way border-image-width CSS property can be defined?
a) 4
b) 6
c) 8
d) 9
View Answer

Answer: d
Explanation: The border-image-width CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge.
advertisement

8. Which of the following is not an appropriate value for border-collapse?
a) all
b) collapse
c) inherit
d) separate
View Answer

Answer: a
Explanation: Except option a, all other values can be set to border collapse CSS property.

9. Which of the following specifies the distance between the borders of adjacent cells?
a) border-spacing-cell
b) border-width-spacing
c) border-spacing
d) cell-spacing
View Answer

Answer: c
Explanation: The border-spacing property sets the distance between the borders of adjacent cells (only for the “separated borders” model).
advertisement

10. Which of the following property defines the border-width, border-style and border-color of an element’s top border in a single declaration?
a) border
b) border-top
c) border-top-corner
d) border-top-style
View Answer

Answer: b
Explanation: The border-top shorthand property sets all the top border properties in one declaration.

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.