CSS Questions & Answers – Styling Tables

CSS Multiple Choice Questions & Answers (MCQs) focuses on “Styling Tables”.

Q 1. Which of the following element is used within the table element to define a caption?
A. <tablecaption>

B. <table-cap>

C. <caption>

D. <table-caption>

Show Answer Answer:-C.

Q 2. Which of the following property is used to specify table borders in CSS?
A. table
B. border
C. table:border
D. none of the mentioned

Show Answer Answer:-B. border
Explanation Example: table{border: 7px solid black;}

Q 3. Which of the following property sets whether the table borders are collapsed into a single border or separated:?
A. border-collapse
B. border
C. collapse
D. table-border

Show Answer Answer:-A. border-collapse
Explanation Example: table{ border-collapse: collapse;}

Q 4. Which of the following property is used to change the width of table?
A. width
B. table
C. table-width
D. resize

Show Answer Answer:-A. width
Explanation Example: table{width: 23px;}

Q 5. Which of the following property sets the vertical alignment?
A. align
B. vertical
C. vertical-align
D. vertical-alignment

Show Answer Answer:-B. vertical
Explanation Example: table{vertical-align: top;}

Q 6. Which of the following property is used to control the space between the border and content in a table?
A. border
B. margin
C. padding
D. resize

Show Answer Answer:-C. padding
Explanation Example: table{border: 4px solid black;}

Q 7. Which of the following property is used to change the background in a table?
A. table-background
B. background
C. color
D. none of the mentioned

Show Answer Answer:-B. background

Q 8. Which of the following property is used to change the height of a table?
A. resize
B. table-height
C. height
D. position-y

Show Answer Answer:-A. resize
Explanation Example: table{height: 45%;}

Q 9. Which of the following property is used to align the text in a table?
A. align
B. text-align
C. text
D. none of the mentioned

Show Answer Answer:-B. text-align
Explanation Example: table{text-align: left;}

Q 10. Which of the following property is used to set order in a table?
A. text
B. padding
C. dotted
D. border

Show Answer Answer:-D. border
Explanation Example: table{border: 1px solid #000;}

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You cannot copy content of this page