Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 15
Q181:
Fill in the blank: To specify the width and height of an image in HTML, you can use the _______ attribute.
A. size
B. style
C. dimensions
D. width and height
Correct Answer:
D
Chapter: 15
Q182:
How can you include an image from another folder?
A. By specifying the absolute URL
B. By using the src attribute with the folder path
C. By using the alt attribute
D. By setting the image attribute
Correct Answer:
B
Chapter: 15
Q183:
Fill in the blank: If a browser cannot find an image, it will display a _______ icon.
A. Broken link
B. Placeholder
C. Loading
D. Default
Correct Answer:
A
Chapter: 15
Q184:
What is the correct syntax to use an image as a link in HTML?
A. <a href="url"><img src="logo.png" alt="logo"></a>
B. <img href="url" src="logo.png" alt="logo">
C. <a src="url"><img href="logo.png" alt="logo"></a>
D. <img href="url" src="logo.png" alt="logo">
Correct Answer:
A
Chapter: 15
Q185:
Fill in the blank: To let an image float to the left of a paragraph, you should use the _______ property.
A. float
B. align
C. display
D. position
Correct Answer:
A
Chapter: 15
Q186:
What is the effect of using style="float:left" on an image?
A. The image will be aligned to the left of the text
B. The image will be centered
C. The image will be aligned to the right
D. The image will be displayed in full size
Correct Answer:
A
Chapter: 15
Q187:
Fill in the blank: To specify dimensions of an image using HTML attributes, you would use width and _______.
A. height
B. size
C. alt
D. style
Correct Answer:
A
Chapter: 16
Q188:
What tag is used to define a table in HTML?
A. <table>
B. <tab>
C. <tbl>
D. <tr>
Correct Answer:
A
Chapter: 16
Q189:
Fill in the blank: Table rows in HTML are defined using the _______ tag.
A. <row>
B. <tr>
C. <td>
D. <th>
Correct Answer:
B
Chapter: 16
Q190:
What attribute is used to add a border to an HTML table?
A. border
B. outline
C. border-style
D. frame
Correct Answer:
A
Chapter: 16
Q191:
Fill in the blank: To make a cell span multiple columns, use the _______ attribute.
A. rowspan
B. align
C. colspan
D. width
Correct Answer:
C
Chapter: 16
Q192:
How can you make table borders collapse into a single border?
A. Use border-collapse property in CSS
B. Use border-spacing property in CSS
C. Use border-style property in CSS
D. Use border attribute in HTML
Correct Answer:
A
Chapter: 16
Q193:
Fill in the blank: The <th> tag in HTML tables is used to define _______.
A. Table data
B. Table heading
C. Table row
D. Table cell
Correct Answer:
B
Chapter: 16
Q194:
What CSS property should you use to change the background color of table rows?
A. background-color
B. color
C. bgcolor
D. border-color
Correct Answer:
A
Chapter: 16
Q195:
Fill in the blank: To style a specific table differently from others, you can use the _______ attribute.
A. class
B. id
C. style
D. name
Correct Answer:
B
Chapter: 16
Q196:
How can you make an HTML table with alternating row colors?
A. Use nth-child CSS selector
B. Use border CSS property
C. Use float CSS property
D. Use text-align CSS property
Correct Answer:
A
Chapter: 16
Q197:
Fill in the blank: The border-collapse property should be set to _______ to make borders collapse.
A. collapse
B. separate
C. solid
D. dotted
Correct Answer:
A
Chapter: 17
Q198:
What tag is used to define an unordered list in HTML?
A. <ul>
B. <list>
C. <ol>
D. <li>
Correct Answer:
A
Chapter: 17
Q199:
Fill in the blank: Each list item in an unordered list starts with the _______ tag.
A. <ul>
B. <ol>
C. <li>
D. <dl>
Correct Answer:
C
Chapter: 17
Q200:
What attribute is used to style the marker of an unordered list?
A. list-style-type
B. marker-style
C. bullet-type
D. list-type
Correct Answer:
A