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. borderExplanation
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-collapseExplanation
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. widthExplanation
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. verticalExplanation
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. paddingExplanation
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. backgroundQ 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. resizeExplanation
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-alignExplanation
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
Leave a Reply