Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 36
Q401:
Which of the following is NOT a valid value for the list-style-type property in CSS?
A. circle
B. square
C. upper-roman
D. dotted
Correct Answer:
D
Chapter: 36
Q402:
Which CSS property is used to change the list item marker to a square?
A. list-style-position
B. list-style-type
C. list-style-image
D. list-style-square
Correct Answer:
B
Chapter: 36
Q403:
How do you set an image as the list item marker in CSS?
A. list-style-type: image;
B. list-style-position: image;
C. list-style-image: url('sqpurple.gif');
D. list-image: url('sqpurple.gif');
Correct Answer:
C
Chapter: 36
Q404:
Which CSS property is used to change the position of the list item markers?
A. list-style-position
B. list-style-type
C. list-position
D. marker-position
Correct Answer:
A
Chapter: 36
Q405:
What value would you use to make an ordered list display items with lower-alpha markers?
A. lower-roman
B. lower-alpha
C. upper-alpha
D. decimal
Correct Answer:
B
Chapter: 36
Q406:
In CSS, which shorthand property is used to set the list style, position, and image in one declaration?
A. list-style
B. list-style-position
C. list-image
D. list-marker
Correct Answer:
A
Chapter: 36
Q407:
Which of the following is a valid CSS declaration to set the list item marker to a circle?
A. ul {list-style-type: square;}
B. ul {list-style-type: circle;}
C. ul {list-style-type: lower-alpha;}
D. ul {list-style-type: decimal;}
Correct Answer:
B
Chapter: 36
Q408:
How would you specify upper-roman as the list item marker for an ordered list in CSS?
A. ol {list-style-type: upper-roman;}
B. ul {list-style-type: upper-roman;}
C. ol {list-type: upper-roman;}
D. ul {list-type: upper-roman;}
Correct Answer:
A
Chapter: 36
Q409:
Which of the following list item markers is used for ordered lists by default?
A. Decimal numbers
B. Bullets
C. Square
D. Upper-roman
Correct Answer:
A
Chapter: 36
Q410:
How do you apply the list style shorthand property to set a square marker, inside position, and an image in one declaration?
A. ul {list-style: square inside url('sqpurple.gif');}
B. ul {list-style-image: url('sqpurple.gif');}
C. ul {list-style: circle square inside;}
D. ul {list-style-type: square image url('sqpurple.gif');}
Correct Answer:
A
Chapter: 37
Q411:
Which CSS property is used to specify table borders?
A. border-collapse
B. border-style
C. border
D. table-border
Correct Answer:
C
Chapter: 37
Q412:
What is the purpose of the border-collapse property in CSS?
A. To specify the width of the border
B. To collapse multiple borders into one
C. To set the color of the border
D. To create a double border effect
Correct Answer:
B
Chapter: 37
Q413:
How do you set the width of a table to 100% in CSS?
A. table {width: 100%;}
B. th {width: 100%;}
C. td {width: 100%;}
D. table {height: 100%;}
Correct Answer:
A
Chapter: 37
Q414:
Which CSS property is used to control the space between the content and border in a table cell?
A. margin
B. spacing
C. padding
D. border-spacing
Correct Answer:
C
Chapter: 37
Q415:
How would you set the vertical alignment of text to the bottom in a <td> element?
A. td {vertical-align: top;}
B. td {vertical-align: middle;}
C. td {vertical-align: bottom;}
D. td {align: bottom;}
Correct Answer:
C
Chapter: 37
Q416:
What is the default vertical alignment of text in <td> elements in a table?
A. Top
B. Bottom
C. Middle
D. Left
Correct Answer:
C
Chapter: 37
Q417:
How would you change the background color of <th> elements to green and text color to white in CSS?
A. th {color: green; background-color: white;}
B. th {background-color: green; color: white;}
C. th {background-color: white; color: green;}
D. th {border-color: green;}
Correct Answer:
B
Chapter: 37
Q418:
Which CSS property is used to set the horizontal alignment of text in a table?
A. text-align
B. align-content
C. justify-content
D. horizontal-align
Correct Answer:
A
Chapter: 37
Q419:
How do you remove double borders from a table in CSS?
A. Use border-collapse: separate;
B. Use border-style: none;
C. Use border-collapse: collapse;
D. Use border-spacing: 0;
Correct Answer:
C
Chapter: 37
Q420:
What is the correct CSS syntax to set a black border for <table>, <th>, and <td> elements?
A. table, th, td {border: 1px solid black;}
B. table {border: black;}
C. th {border-color: black;}
D. td {border-style: black;}
Correct Answer:
A