CSS Questions & Answers – Border Elements

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

1. Which of the following property defines in a shorthand form the width, style, and color for the bottom border of an element?
a) border-bottom
b) border-bottom-color
c) border-bottom-all
d) none of the mentioned
View Answer

Answer: a
Explanation:

Syntax: border-bottom: border-width border-style border-color;

2. Which of the following property sets the width of an element’s bottom border?
a) border
b) border-collapse
c) border-bottom-width
d) none of the mentioned
View Answer

Answer: c
Explanation:

advertisement
advertisement
Syntax: border-bottom-width: non-negative length | medium | thick | thin | inherit

3. Which of the following property defines whether table cell borders are connected or separate?
a) border-table
b) border
c) border-collapse
d) none of the mentioned
View Answer

Answer: c
Explanation:

Syntax: border-collapse: collapse | separate | inherit

4. Which of the following property defines the style for the right border of an element?
a) border-spacing
b) border-spacing
c) border-right
d) border-right-style
View Answer

Answer: c
Explanation:

advertisement
Syntax: border-right-style: dashed | dotted | double

5. Which of the following property defines the color of an element’s top border?
a) border-color
b) border-top
c) border-top-color-webkit
d) border-top-color
View Answer

Answer: d
Explanation:

advertisement
Syntax: border-top-color: color | transparent | inherit

6. Which of the following property sets the width of an element’s complete border?
a) border-width
b) width
c) border-depth
d) none of the mentioned
View Answer

Answer: a
Explanation:

Syntax: border-width: width

7. Which of the following property defines the visual style of up to four different sides of a border?
a) border-style
b) border
c) border-top
d) none of the mentioned
View Answer

Answer: a
Explanation: Syntax:
border-style: style

8. Which of the following defines in a shorthand form the width, style, and color for the top border of an element?
a) border-up
b) border-bottom
c) border-style
d) none of the mentioned
View Answer

Answer: d
Explanation:

Syntax: border-top: border-width border-style border-color;

9. Which of the following property defines the y (vertical) coordinate for a positioned element, relative to the bottom of the enclosing object or browser window?
a) border
b) bottom
c) position
d) none of the mentioned
View Answer

Answer: b
Explanation:

Syntax: bottom: length | percentage | auto | inherit

10. Which of the following property specifies the placement of an element in relation to floating objects?
a) clear
b) color
c) space
d) none of the mentioned
View Answer

Answer: a
Explanation:

Syntax: clear: both | left | none | right

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.