HTML

Practice HTML MCQs covering document structure, semantic elements, forms, tables, multimedia, links, images, accessibility, HTML5 features, and other core web development concepts.

3
Topics
304
Total MCQs

HTML

Practice HTML MCQs covering document structure, semantic elements, forms, tables, multimedia, links, images, accessibility, HTML5 features, and other core web development concepts.

100 MCQs Page 2 of 5
0
0
/ 100
0%
A. <input type="submit">
B. <button type="submit">
C. <input type="button">
D. Both A and B
Answer: Both <input type="submit"> and <button type="submit"> can be used to create submit buttons.
A. <head>
B. <header>
C. <meta>
D. <body>
Answer: The <head> element contains metadata about the document, such as title, character set, and linked stylesheets.
A. <!-- comment -->
B. /* comment */
C. // comment
D. <comment>
Answer: HTML comments are written using <!-- comment --> and are not displayed in the browser.
A. validate
B. required
C. mandatory
D. notnull
Answer: The required attribute specifies that an input field must be filled out before submitting the form.
A. <a href="url" target="_blank">
B. <a href="url" target="_new">
C. <a href="url" new>
D. <a href="url" target="new">
Answer: The target="_blank" attribute opens the linked document in a new browser tab or window.
A. <div>
B. <section>
C. <span>
D. <part>
Answer: The <div> tag defines a division or section in an HTML document and is used as a container for other elements.
A. <i>
B. <em>
C. <italic>
D. Both A and B
Answer: Both <i> and <em> display italic text, but <em> carries semantic emphasis while <i> is just stylistic.
A. <footer>
B. <bottom>
C. <foot>
D. <end>
Answer: The <footer> element defines a footer for a document or section, typically containing authorship or copyright information.
A. <b>
B. <strong>
C. <bold>
D. Both A and B
Answer: Both <b> and <strong> display bold text, but <strong> carries semantic importance while <b> is just stylistic.
A. <nav>
B. <navigation>
C. <menu>
D. <navbar>
Answer: The <nav> element defines a set of navigation links in an HTML document.
A. charset
B. encoding
C. char-set
D. encode
Answer: The charset attribute in the <meta> tag specifies the character encoding for the HTML document, e.g., UTF-8.
A. <input type="radio">
B. <input type="option">
C. <radio>
D. <input type="circle">
Answer: <input type="radio"> creates a radio button that allows users to select one option from a group.
A. <sub>
B. <sup>
C. <script>
D. <s>
Answer: The <sub> tag defines subscript text, which appears half a character below the normal line.
A. <input type="password">
B. <input type="secret">
C. <password>
D. <input type="pass">
Answer: <input type="password"> creates a password field where characters are masked for privacy.
A. <map>
B. <imagemap>
C. <area>
D. <usemap>
Answer: The <map> tag is used to define an image map, which is used with <area> tags to create clickable regions on an image.
A. <a href="mailto:email@example.com">
B. <a href="email@example.com">
C. <mail>email@example.com</mail>
D. <a mailto="email@example.com">
Answer: A mailto link is created using <a href="mailto:email@example.com"> to open the user's email client.
A. <li>
B. <item>
C. <listitem>
D. <it>
Answer: The <li> tag defines a list item in ordered (<ol>) and unordered (<ul>) lists.
A. <input type="color">
B. <input type="picker">
C. <colorpicker>
D. <input type="colorpicker">
Answer: <input type="color"> creates a color picker that allows users to select a color from a palette.
A. <main>
B. <body>
C. <content>
D. <section>
Answer: The <main> element specifies the main content of a document, and there should only be one per page.
A. <input type="date">
B. <input type="datetime">
C. <datepicker>
D. <input type="calendar">
Answer: <input type="date"> creates a date picker that allows users to select a date from a calendar.
1 2 3 4