You are here

Html5 multiple choice questions and answers | mcq | interview questions

Submitted by Asif Nowaj, Last Modified on 2021-02-07

Html5 MCQ or multiple choice questions for interview, practical exam, lab test.

1. Which of the following is true about HTML 5?
A. HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1.
B. HTML5 is a standard for structuring and presenting content on the World Wide Web.
C. HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).
D. All of the above.
2. Which of the following is not true about HTML5?
A. Better error handling
B. Reduce the need for external plug-in (like Flash)
C. Uses more markups to replace scripting language
D. All of the above are correct.
E. Only options (A) and (C) are correct.
3. Which of the following feature is a part of HTML 5?
A. Persistent Local Storage
B. WebSocket
C. Server-Sent Events
D. All of the above.
4. Which of the following is not a new feature of HTML5?
A. Use <canvas> element for 2D drawing.
B. Use <video> elements for media playback.
C. Use <audio> elements for media playback.
D. Support for local storage
E. All of the above are new features.
5. Which of the following browsers supports HTML5 in its latest version?
A. Apple Safari
B. Google Chrome
C. Both of the above
D. None of the above
6. Which of the following is not form controls elements in HTML5?
A. url
B. search
C. money
D. email
E. time
7. Which of the following browsers supports HTML5 in its latest version?
A. Mozilla Firefox
B. Opera
C. Both of the above.
D. None of the above.
8. Which of the following is not a new element of HTML5?
A. <colgroup>
B. <details>
C. <summary>
D. <figure>
E. <figcaption>
9. Is HTML5 backward compatible with old browsers?
A. true
B. false
10. Which of the following is not a new element of HTML5?
A. <ins>
B. <section>
C. <time>
D. <wbr>
E. <bdi>
11. Are HTML tags case sensitive?
A. true
B. false
12. Which of the following elements has not been removed from HTML5?
A. <font>
B. <basefont>
C. <small>
D. <big>
E. <strike>
13. Which of the following features is a part of HTML 5?
A. Canvas
B. Audio & Video
C. Geolocation
D. All of the above.
14. Which of the following is true about video in HTML5?
A. HTML5 doesn't support video.
B. To play video we must have to use some plug-in.
C. It defines a new element which specifies a standard way to embed a video.
D. Both the options (a) and (b)
E. None of the above.
15. Which of the following tag represents a generic document or application section in HTML5?
A. section
B. article
C. aside
D. header
16. Correct way to declaring character encoding in html5 is:
A. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
B. <meta http-equiv="Content-Type" charset=UTF-8" />
C. <meta http-equiv="Content-Type" content="text/html;/>
D. <meta content="text/html; charset=UTF-8" />
E. <meta charset="UTF-8" />
17. Which of the following browser supports HTML5 in its latest version?
A. Mozilla Firefox
B. Opera
C. Both of the above.
D. None of the above.
18. <video controls="controls" preload="none"> <source src="song.mp4" type="video/mp4" /> </video>
Which of the following is true?
A. It should load the entire video when the page loads.
B. It should load only metadata when the page loads.
C. It should load the part of the video when the page loads.
D. It should not load the video when the page loads.
E. Error.
19. Which of the following tag can be used to associate a caption together with some embedded content in HTML5?
A. footer
B. nav
C. dialog
D. figure
20. Which of the following is the correct way to set the dragged data?
A. e.dataTransfer.setData("Data",e.target.id);
B. e.dataTransfer.setData(e.target.id,"Data");
C. e.dataTransfer.setData(e.target.id,e.source.id,"Data");
D. e.dataTransfer.setData("Data",e.target.id,e.source.id);
E. e.dataTransfer.setData(e.target.id,e.source.id);
21. Which of the following input control represents a date and time (year, month, day, hour, minute, second, fractions of a second) encoded according to ISO 8601 with the time zone set to UTC in Web Form 2.0?
A. datetime
B. datetime-local
C. date
D. month
22. Which of the following attributes is used to specify the title of the text track in a <track> element?
A. caption
B. subtitle
C. kind
D. label
E. srclang
23. Which of the following tag represents an independent piece of content of a document in HTML5?
A. section
B. article
C. aside
D. header
24. Which of the following is not true about srclang attribute of a <track> element?
A. This specifies the language of the track text data.
B. This attribute is required if kind="subtitles"
C. Its value can be two-letter language code.
D. Only option (A) and (C) are correct.
E. Options (A), (B) and (C) are correct.
25. Which of the following tag can be used to mark up a conversation in HTML5?
A. footer
B. nav
C. dialog
D. figure
26. What is correct behavior of preventDefault() function:
A. Prevent the drag event
B. Prevent the drop event
C. Prevent the browser default handling of the data
D. Prevent the load data in the browser.
E. All of the above.
27. Which of the following input control represents a date consisting of a year and a month encoded according to ISO 8601 in Web Form 2.0?
A. datetime
B. datetime-local
C. date
D. month
28. Type attribute of <source> element for a video is:
A. Media source type
B. Media compression type
C. MIME type
D. Media extension
E. Its value can be image, audio or video
29. Which of the following is correct about custom attributes in HTML5?
A. A custom data attribute starts with data- and would be named based on your requirement.
B. You would be able to get the values of these attributes using JavaScript APIs or CSS in similar way as you get for standard attributes.
C. Both of the above.
D. None of the above.
30. Which of the following tag represents a section of the document intended for navigation in HTML5?
A. footer
B. nav
C. section
D. dialog
31. Which of the following is true about <!doctype> declaration in HTML5?
A. <!doctype> declaration is optional.
B. There must be only one <!doctype> declaration.
C. There must be only two <!doctype> declarations.
D. There can be any number of <!doctype> declarations.
E. None of the above.
32. Which of the following tag represents the footer of a section in HTML5?
A. footer
B. nav
C. section
D. dialog
33. Which of the following is not a valid event of drag and drop?
A. ondragstart
B. ondragover
C. ondragend
D. ondrop
E. All of the above are correct.
34. Which of the following tag represents a section of the document intended for navigation in HTML5?
A. footer
B. nav
C. section
D. dialog
35. Which of the following is not a method of <video> element?
A. play()
B. pause()
C. load()
D. canPlayType
E. Above all are methods of the <video> element.
36. Which of the following input control represents a date and time (year, month, day, hour, minute, second, fractions of a second) encoded according to ISO 8601 with no time zone information in Web Form 2.0?
A. datetime
B. datetime-local
C. date
D. month
37. How to make an element draggable:
A. <div drag="true" />
B. <div draggable="true" />
C. <div type="drag" />
D. <div type="draggable"/>
E. All of the above are correct.
38. Which of the following is correct about custom attributes in HTML5?
A. A custom data attribute starts with data- and would be named based on your requirement.
B. You would be able to get the values of these attributes using JavaScript APIs or CSS in similar way as you get for standard attributes.
C. Both of the above.
D. None of the above.
39. Which event will fire when an element is dragged?
A. ondragoccure
B. ondragstart
C. ondragbegin
D. ondrag
E. ondragging
40. Which of the following tag represents the header of a section in HTML5?
A - section
B - article
C - aside
D - header
41. Which of the following is not a new element of HTML5?
A. <article>
B. <aside>
C. <bdi>
D. <command>
E. <big>
42. Which of the following input control represents a date (year, month, day) encoded according to ISO 8601 in Web Form 2.0?
A. datetime
B. datetime-local
C. date
D. month
43. Which method will be used to get the dragged data?
A. dataTransfer.getdragdata
B. dataTransfer.getdragelement
C. dataTransfer.setdata
D. dataTransfer.getdata
E. dataTransfer.getdrop
44. Which of the following tag represents a piece of content that is only slightly related to the rest of the page in HTML5?
A - section
B - article
C - aside
D - header
45. Which of the following is not a new media element of HTML5?
A. <audio>
B. <video>
C. <object>
D. <source>
E. <track>
46. Which of the following is correct about Web form 2.0 in HTML5?
A. Web Forms 2.0 is an extension to the forms features found in HTML4.
B. Form elements and attributes in HTML5 provide a greater degree of semantic mark-up than HTML4
C. Form elements and attributes in HTML5 remove a great deal of the need for tedious scripting and styling that was required in HTML4
D. All of the above.
47. Which of the following browsers doesn't support <video> tag?
A. Internet Explorer 9
B. Firefox
C. Opera
D. Chrome
E. All supports <video> tag.
48. Which of the following is correct about Web form 2.0 in HTML5?
A. Web Forms 2.0 is an extension to the forms features found in HTML4.
B. Form elements and attributes in HTML5 provide a greater degree of semantic mark-up than HTML4.
C. Form elements and attributes in HTML5 remove a great deal of the need for tedious scripting and styling that was required in HTML4.
D. All of the above.
49. Which of the following attributes is used to specify the URL of the track file in a <track> element?
A. origin
B. source
C. subtitle
D. src
E. url
50. Which of the following is the most appropriate tag in html5 to divide the document into logical document sections?
A. <div></div>
B. <span></span>
C. <frame></frame>
D. <section></section>
E. <group></group>
51. Which of the following is not a property of the <video> element?
A. abort
B. currentTime
C. currentSrc
D. videoWidth
E. duration
52. What is the default behavior of browsers when any element is dropped?
A. Drop on the element.
B. Open as link on drop.
C. Display a warning message.
D. Hide the dropping element.
E. None of the above is correct.
53. How can we create DOCTYPE in html5?
A. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
B. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
C. <!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
D. <!DOCTYPE html PUBLIC>
E. <!DOCTYPE html>
54. When autoplay attribute has defined in <video> element then:
A. preload attribute is ignored.
B. Web browser assume preload="auto"
C. Web browser assume preload="metadata"
D. Both (A) and (C)
E. None of these.
55. Which of the following attributes is used to specify the language of the track text data in a <track> element?
A. type
B. kind
C. lang
D. srclang
E. language

Discussion or Comment

If you have anything in mind to share, please bring it in the discussion forum here.

https://forum.everyething.com/others-f41/