Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 19
Q221:
Fill in the blank: The #nav element in the CSS example has a height of _______.
A. 100px
B. 150px
C. 300px
D. 200px
Correct Answer:
C
Chapter: 19
Q222:
What is the purpose of the clear:both property in the #footer element?
A. To clear floats and prevent overlap
B. To center the text
C. To set the background color
D. To adjust the padding
Correct Answer:
A
Chapter: 19
Q223:
Fill in the blank: To create a layout with a table, you should use the <table> element with appropriate _______ for styling.
A. attributes
B. CSS
C. scripts
D. IDs
Correct Answer:
B
Chapter: 19
Q224:
What CSS property is used to set the background color of the #footer element?
A. color
B. background-color
C. border
D. width
Correct Answer:
B
Chapter: 19
Q225:
Fill in the blank: The table.lamp CSS class in the example sets the table width to _______.
A. 1
B. 0.5
C. 0.75
D. auto
Correct Answer:
A
Chapter: 19
Q226:
Which HTML element is not suitable for creating a layout structure?
A. <div>
B. <table>
C. <p>
D. <span>
Correct Answer:
C
Chapter: 19
Q227:
Fill in the blank: In the CSS code provided, the #section element has a width of _______.
A. 100px
B. 350px
C. 200px
D. 150px
Correct Answer:
B
Chapter: 19
Q228:
What does the width:100% CSS property do for the table.lamp element?
A. Sets the table width to 100% of its container
B. Sets the table height to 100% of its container
C. Sets the border width to 100%
D. Sets the font size to 100%
Correct Answer:
A
Chapter: 19
Q229:
Fill in the blank: The padding:5px in the #header and #footer elements adds _______ around the content.
A. margin
B. space inside
C. border
D. line-height
Correct Answer:
B
Chapter: 20
Q230:
What tag is used to embed another document within the current HTML document?
A. <embed>
B. <iframe>
C. <object>
D. <frame>
Correct Answer:
B
Chapter: 20
Q231:
Fill in the blank: To specify the size of an iframe, you use the _______ and _______ attributes.
A. width, height
B. src, name
C. border, style
D. color, padding
Correct Answer:
A
Chapter: 20
Q232:
Which attribute of the <iframe> tag is used to remove the border?
A. style
B. width
C. height
D. src
Correct Answer:
A
Chapter: 20
Q233:
Fill in the blank: To set the width and height of an iframe, the values can be specified in pixels or _______.
A. percentages
B. em
C. rem
D. viewport units
Correct Answer:
A
Chapter: 20
Q234:
Which CSS property is used to remove the border from an iframe?
A. border
B. padding
C. margin
D. background
Correct Answer:
A
Chapter: 20
Q235:
Fill in the blank: To set the target frame for a link to an iframe, you need to use the ______ attribute in the <a> tag.
A. target
B. href
C. name
D. src
Correct Answer:
A
Chapter: 20
Q236:
What should you do if you want to embed a document into an HTML page without showing the border of the iframe?
A. Use the border:none style
B. Set the width attribute to 100%
C. Apply a padding of 10px
D. Use the height attribute
Correct Answer:
A
Chapter: 20
Q237:
Fill in the blank: The src attribute of the <iframe> tag specifies the _______ of the document to embed.
A. URL
B. height
C. border
D. width
Correct Answer:
A
Chapter: 20
Q238:
To target an iframe with a link, the target attribute of the <a> tag must match the ______ attribute of the <iframe> tag.
A. name
B. src
C. border
D. width
Correct Answer:
A
Chapter: 20
Q239:
Fill in the blank: An iframe that is 200 pixels wide and 200 pixels high can be created using width="_____" and height="_____" attributes.
A. 200, 200
B. 100, 100
C. 300, 300
D. 50, 50
Correct Answer:
A
Chapter: 21
Q240:
What does the <form> element define in HTML?
A. A table
B. An inline frame
C. An HTML form
D. A navigation bar
Correct Answer:
C