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.
Answer: Both <input type="submit"> and <button type="submit"> can be used to create submit buttons.
Answer: The <head> element contains metadata about the document, such as title, character set, and linked stylesheets.
Answer: HTML comments are written using <!-- comment --> and are not displayed in the browser.
Answer: The required attribute specifies that an input field must be filled out before submitting the form.
Answer: The target="_blank" attribute opens the linked document in a new browser tab or window.
Answer: The <div> tag defines a division or section in an HTML document and is used as a container for other elements.
Answer: Both <i> and <em> display italic text, but <em> carries semantic emphasis while <i> is just stylistic.
Answer: The <footer> element defines a footer for a document or section, typically containing authorship or copyright information.
Answer: Both <b> and <strong> display bold text, but <strong> carries semantic importance while <b> is just stylistic.
Answer: The <nav> element defines a set of navigation links in an HTML document.
Answer: The charset attribute in the <meta> tag specifies the character encoding for the HTML document, e.g., UTF-8.
Answer: <input type="radio"> creates a radio button that allows users to select one option from a group.
Answer: The <sub> tag defines subscript text, which appears half a character below the normal line.
Answer: <input type="password"> creates a password field where characters are masked for privacy.
Answer: The <map> tag is used to define an image map, which is used with <area> tags to create clickable regions on an image.
Answer: A mailto link is created using <a href="mailto:email@example.com"> to open the user's email client.
Answer: The <li> tag defines a list item in ordered (<ol>) and unordered (<ul>) lists.
Answer: <input type="color"> creates a color picker that allows users to select a color from a palette.
Answer: The <main> element specifies the main content of a document, and there should only be one per page.
Answer: <input type="date"> creates a date picker that allows users to select a date from a calendar.