Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 13
Q161:
What syntax is used to add a comment in HTML?
A. <!-- comment -->
B. /* comment */
C. // comment
D. # comment
Correct Answer:
A
Chapter: 13
Q162:
Fill in the blank: The HTML comment tag <!-- ... --> is used to _______ HTML content.
A. Display
B. Hide
C. Execute
D. Format
Correct Answer:
B
Chapter: 13
Q163:
Which of the following is used to include conditional comments in HTML?
A. <!--[if IE 8]>...<![endif]-->
B. /* if IE 8 */...
C. // if IE 8
D. # if IE 8
Correct Answer:
A
Chapter: 13
Q164:
Fill in the blank: HTML comments wrapped inside <!-- ... --> tags are not _______.
A. Visible
B. Executed
C. Hidden
D. Processed
Correct Answer:
A
Chapter: 13
Q165:
What should you do with software-generated comment tags like <!--webbot bot-->?
A. Remove them
B. Edit them
C. Leave them
D. Ignore them
Correct Answer:
C
Chapter: 13
Q166:
Fill in the blank: To comment out HTML code for debugging, you use _______.
A. Conditional comments
B. HTML comments
C. JavaScript comments
D. CSS comments
Correct Answer:
B
Chapter: 14
Q167:
What tag is used to define a hyperlink in HTML?
A. <link>
B. <a>
C. <hyperlink>
D. <url>
Correct Answer:
B
Chapter: 14
Q168:
Fill in the blank: The href attribute in the <a> tag specifies the _______.
A. Link text
B. Destination address
C. Font size
D. Color
Correct Answer:
B
Chapter: 14
Q169:
What does the target="_blank" attribute do in a link?
A. Opens the link in the same window
B. Opens the link in a new window or tab
C. Changes the link color
D. Makes the link invisible
Correct Answer:
B
Chapter: 14
Q170:
Fill in the blank: By default, unvisited links in most browsers are displayed as _______.
A. Blue and underlined
B. Red and bold
C. Green and italic
D. Black and italic
Correct Answer:
A
Chapter: 14
Q171:
How does a browser typically display a visited link?
A. Underlined and red
B. Underlined and purple
C. Bold and blue
D. Italic and green
Correct Answer:
B
Chapter: 14
Q172:
What attribute specifies where to open the linked document?
A. type
B. target
C. class
D. style
Correct Answer:
B
Chapter: 14
Q173:
Fill in the blank: To create a link that points to a specific section within the same document, you use the _______ attribute in the <a> tag.
A. id
B. class
C. href
D. target
Correct Answer:
A
Chapter: 14
Q174:
What is the default appearance of an active link in most browsers?
A. Underlined and blue
B. Bold and red
C. Underlined and red
D. Italic and purple
Correct Answer:
C
Chapter: 14
Q175:
Fill in the blank: The <a> tag with a href attribute pointing to page.htm#tips will link to the element with id="tips" on _______.
A. The current page
B. The linked page
C. The server root
D. The browser's home page
Correct Answer:
B
Chapter: 14
Q176:
What element is used to display text or an image as a hyperlink?
A. <link>
B. <a>
C. <image>
D. <text>
Correct Answer:
B
Chapter: 14
Q177:
Fill in the blank: To apply specific styles to different states of a link, you can use pseudo-classes like :link, :visited, :hover, and :active in _______.
A. JavaScript
B. CSS
C. HTML
D. SQL
Correct Answer:
B
Chapter: 15
Q178:
What tag is used to define an image in HTML?
A. <picture>
B. <image>
C. <img>
D. <src>
Correct Answer:
C
Chapter: 15
Q179:
Fill in the blank: The src attribute in the <img> tag specifies the _______.
A. Image size
B. Image URL
C. Image description
D. Image alignment
Correct Answer:
B
Chapter: 15
Q180:
What attribute is used to provide alternative text for an image if it cannot be displayed?
A. alt
B. title
C. desc
D. caption
Correct Answer:
A