Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 17
Q201:
Fill in the blank: To create an ordered list with Roman upper case numbers, use type="______".
A. i
B. I
C. a
D. A
Correct Answer:
B
Chapter: 17
Q202:
How do you define a horizontal list in HTML using CSS?
A. Set display: block on the list items
B. Set display: inline on the list items
C. Set list-style-type: none on the list
D. Set float: left on the list items
Correct Answer:
B
Chapter: 17
Q203:
Fill in the blank: An HTML description list is defined with the _______ tag.
A. <ol>
B. <ul>
C. <dl>
D. <li>
Correct Answer:
C
Chapter: 17
Q204:
What tag is used to define a term in a description list?
A. <dt>
B. <dd>
C. <li>
D. <td>
Correct Answer:
A
Chapter: 17
Q205:
Fill in the blank: In an ordered list, the type="a" attribute will display items in _______ case.
A. upper
B. lower
C. Roman
D. decimal
Correct Answer:
B
Chapter: 17
Q206:
How can you style a list to have numbers as markers in HTML?
A. Use list-style-type: decimal
B. Use list-style-type: circle
C. Use list-style-type: square
D. Use list-style-type: none
Correct Answer:
A
Chapter: 17
Q207:
Fill in the blank: To display a list with bullets as markers, use the _______ style in CSS.
A. list-style-type: square
B. list-style-type: circle
C. list-style-type: disc
D. list-style-type: none
Correct Answer:
C
Chapter: 18
Q208:
What is a block-level element in HTML?
A. An element that does not start on a new line
B. An element that starts on a new line
C. An element that always appears inline
D. An element that is used for inline styles
Correct Answer:
B
Chapter: 18
Q209:
Fill in the blank: The <div> element in HTML is a _______ level element.
A. block
B. inline
C. floating
D. container
Correct Answer:
A
Chapter: 18
Q210:
Which HTML tag is typically used for creating a block-level container?
A. <span>
B. <div>
C. <b>
D. <a>
Correct Answer:
B
Chapter: 18
Q211:
Fill in the blank: The <span> element is commonly used to style _______ parts of text.
A. entire paragraphs
B. blocks of content
C. individual words or phrases
D. table cells
Correct Answer:
C
Chapter: 18
Q212:
Which of the following is a block-level HTML element?
A. <b>
B. <div>
C. <img>
D. <span>
Correct Answer:
B
Chapter: 18
Q213:
Fill in the blank: The <div> element is used to group _______ elements together.
A. inline
B. floating
C. block-level
D. text
Correct Answer:
C
Chapter: 18
Q214:
What is the primary difference between <div> and <span> elements?
A. <div> is inline, <span> is block-level
B. <div> is block-level, <span> is inline
C. <div> has attributes, <span> does not
D. <div> is for text, <span> is for images
Correct Answer:
B
Chapter: 18
Q215:
Fill in the blank: The <h1> tag with a <span> element can be used to style _______ within a heading.
A. the entire heading
B. part of the heading
C. the border of the heading
D. the font of the heading
Correct Answer:
B
Chapter: 18
Q216:
Which HTML tag is used to apply styles to a block of content?
A. <span>
B. <div>
C. <a>
D. <table>
Correct Answer:
B
Chapter: 18
Q217:
Fill in the blank: The <span> element is useful for applying styles to _______.
A. entire blocks of text
B. single lines of text
C. individual words or text segments
D. images
Correct Answer:
C
Chapter: 19
Q218:
What HTML tag is used to create a layout using sections like header, nav, section, and footer?
A. <table>
B. <div>
C. <ul>
D. <span>
Correct Answer:
B
Chapter: 19
Q219:
Fill in the blank: The <div> element in HTML is commonly used for creating _______ on a webpage.
A. inline styles
B. layouts
C. links
D. images
Correct Answer:
B
Chapter: 19
Q220:
In the provided CSS code, what property is used to align the text in the #header element?
A. text-align
B. background-color
C. padding
D. line-height
Correct Answer:
A