This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “Elements and Attributes to Support Web Applications”.
1. What does ‘On-Screen Action’ means in the testing of HTML5 applications?
a) Using Drag action
b) Using new input type
c) Using play and pause action of audio and video elements
d) Verifying SVG and Canvas elements
Explanation: While testing of HTML5 for a browser i.e. whether its elements are supported by the browser or not one can use draggable content using Drag action and this action can be called through On-Screen Action operation.
2. What can be used to verify a displayed graphics?
a) Property checkpoints
b) Region checkpoints
c) On-Screen Action
d) Local STorage
Explanation: Region checkpoints are used to verify a displayed graphics. It is a kind of test operation which gives verification of application’s window or control is displayed correctly or not. Object’s property is verified by region checkpoints which is test operation. Local storage is for storing data.
3. Which element has been removed from HTML5 (W3C) specification?
Explanation: A section that is tangentially related to its surrounding content is defined by <aside> tag. A block of navigation links is provided by newly added element in HTML5 called <nav>. <hgroup> tag has been removed from HTML5 specification, but it can be seen in WHATWG version of HTML. The purpose of this element is how headings are displayed. It’s practice is limited to theory only. <figure> tag specifies its own self defined content which may contain diagrams, photos etc.
4. Which of the following is used for plug-in content?
Explanation: <embed> tag is new in HTML5 which also helps in validation of HTML5 page. It has attributes like height, src, type and width. HTML4 does not support this tag. Multiple media sources for video , audio and pictures are provided by <source> tag. <meter> tag gives a scalar measurement within a particular range. Progress of a task is shown by <progress> element.
5. Which of the following does not lie under the attribute of <input> and is not supported by Opera?
Explanation: <input> element type has new values as ‘url’, ‘email’, ‘datetime’, ‘date’, ‘month’, ‘tel’, ‘time’, ‘number’, ‘search’, ‘color’, ‘range’, ‘datetime-local’, ‘week’.
6. Which is the new attribute of <input> element that is used to change the appearance of checkbox?
7. Which attribute does not lie inside <a> and <area> elements?
Explanation: Preload is the attribute of the <video> element. Media, ping, hreflang, rel are the attribute used with <a> and <area> elements.
8. Which element does not support autofocus attribute?
Explanation: Autofocus is a new attribute as well as very interesting one. It can be specified on <input>, <textarea>, <button> and <select> elements. It is a way to focus a form control when the page is loaded.
9. Which element does not support form attribute?
Explanation: The new form attribute is for <input>, <select>, <textarea>, <button>, <output> and <fieldset>. One can place these elements anywhere on the page.
10. Which attribute of <input> element can be used both with <datalist> and <select> elements?
Explanation: List is the new attribute of <input> element and can be used together with <datalist> and <select> elements. Other attributes like pattern, multiple, max, min, step are new attribute used with the <input> element only.
11. Which is not a Boolean attribute?
Explanation: Formtarget attribute is a Boolean attribute that must have a value that is a valid browsing context name. Multiple is a new Boolean attribute of <input> the element which specifies constraint, novalidate, and formvalidate are <form> attribute and are Boolean as well.
12. Which of the following is not the keyword of form method attribute?
Explanation: The keyword GET, POST, PUT, DELETE mapped to the state GET, POST, PUT, DELETE and indicating the HTTP method respectively.
13. What is the work of async attribute?
a) It influences script loading
b) It gives a label to the menu
c) It validates form data
d) Enables a set of extra restrictions on any content
Explanation: Async is the new attribute of the <script> element which influences script loading and its execution. It is a Boolean attribute which shows the manner of script execution. If async is present, the script will be executed asynchronously, as soon as it is available.
14. Which is not <iframe> attribute?
Explanation: Sizes is the attribute of <link> element. Sandbox is the attribute of <iframe> element that enables a set of extra restrictions on any content, seamless is a Boolean attribute of <iframe> which seamlessly included in the parent document, srcdoc attribute gives the content of the page that the nested browsing context is to contain.
15. Which is not a new global attribute in HTML5?
Explanation: Contenteditable, contextmenu, data, draggable, hidden, role, aria, spellcheck all are new global attributes introduced in HTML5. Class, dir, id, lang, style, tabindex, title are the attributes of HTML4 and now specified as global in HTML5.
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.