Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 37
Q421:
How do you set the height of <th> elements to 50px in CSS?
A. th {height: 50%;}
B. th {height: 50px;}
C. th {width: 50px;}
D. th {height: 50em;}
Correct Answer:
B
Chapter: 37
Q422:
Which CSS property is used to specify the color of table borders?
A. border-color
B. border-style
C. border-width
D. table-color
Correct Answer:
A
Chapter: 37
Q423:
How do you set the padding inside <td> elements to 15px?
A. td {padding: 15px;}
B. td {margin: 15px;}
C. td {spacing: 15px;}
D. td {border-spacing: 15px;}
Correct Answer:
A
Chapter: 37
Q424:
Which property is used to set the text alignment to the left for all <th> elements?
A. th {text-align: center;}
B. th {text-align: right;}
C. th {text-align: left;}
D. th {align: left;}
Correct Answer:
C
Chapter: 38
Q425:
What are the four parts of the CSS box model?
A. Content, Padding, Border, Margin
B. Content, Padding, Border, Background
C. Margin, Border, Padding, Text
D. Content, Margin, Border, Color
Correct Answer:
A
Chapter: 38
Q426:
Which part of the CSS box model is used to clear space around the content and is transparent?
A. Border
B. Padding
C. Margin
D. Content
Correct Answer:
B
Chapter: 38
Q427:
In the box model, where does the padding appear?
A. Inside the content
B. Outside the border
C. Around the content
D. Between the border and margin
Correct Answer:
C
Chapter: 38
Q428:
How do you define the width of a <div> element to 320px in CSS?
A. div {width: 350px;}
B. div {width: 300px;}
C. div {width: 320px;}
D. div {width: 340px;}
Correct Answer:
C
Chapter: 38
Q429:
Which CSS property is used to add a border around an element in the box model?
A. margin
B. padding
C. border
D. width
Correct Answer:
C
Chapter: 38
Q430:
Fill in the blank: In the CSS box model, the ________ property clears an area outside the border and is transparent.
A. padding
B. content
C. margin
D. border
Correct Answer:
C
Chapter: 38
Q431:
What is the default value of the margin property if it is not specified in the CSS?
A. 10px
B. 0px
C. 25px
D. 5px
Correct Answer:
B
Chapter: 38
Q432:
Which part of the CSS box model directly surrounds the content?
A. Margin
B. Padding
C. Border
D. Width
Correct Answer:
B
Chapter: 38
Q433:
How do you add a 25px solid navy border to a <div> element in CSS?
A. div {border: 25px navy;}
B. div {border: 25px solid navy;}
C. div {border-width: 25px; border-color: navy;}
D. div {border-size: 25px;}
Correct Answer:
B
Chapter: 38
Q434:
Fill in the blank: The ________ property in CSS is used to specify the space around the content inside the box model.
A. padding
B. margin
C. border
D. width
Correct Answer:
A
Chapter: 38
Q435:
Which of the following will set a total width of 350px for a <div> element?
A. div {width: 350px; padding: 10px;}
B. div {width: 320px; padding: 10px; border: 5px solid gray; margin: 0;}
C. div {width: 320px; padding: 15px; border: 5px solid gray;}
D. div {width: 350px; padding: 0px;}
Correct Answer:
B
Chapter: 38
Q436:
How do you remove the margin around a <div> element in CSS?
A. div {margin: auto;}
B. div {margin: 0;}
C. div {margin: 25px;}
D. div {margin: 10px;}
Correct Answer:
B
Chapter: 38
Q437:
What will be the total width of a <div> element if the width is set to 300px, padding is 25px, border is 25px, and margin is 25px?
A. 300px
B. 400px
C. 350px
D. 450px
Correct Answer:
D
Chapter: 38
Q438:
Which CSS property would you use to clear space around the outside of an element's border?
A. padding
B. margin
C. border
D. content
Correct Answer:
B
Chapter: 39
Q439:
What property in CSS is used to specify the kind of border to display?
A. border-color
B. border-style
C. border-width
D. border-outline
Correct Answer:
B
Chapter: 39
Q440:
Which of the following is a valid value for the border-width property?
A. wide
B. medium
C. large
D. extra-thin
Correct Answer:
B