Thursday, 11 February 2016

Html5 multiple choice questions and answers

Html5 MCQ or multiple choice questions for practical exam, lab test, and viva test etc.

1. 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.

2. Which of the following is not 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.

3. Which of the following is not form controls elements in HTML5?

A. url
B. search
C. money
D. email
E. time

4. Which of the following is not new element of HTML5?

A. <colgroup>
B. <details>
C. <summary>
D. <figure>
E. <figcaption>

5. Which of the following is not new element of HTML5?

A. <ins>
B. <section>
C. <time>
D. <wbr>
E. <bdi>

6. Which of the following element has not removed from HTML5?

A. <font>
B. <basefont>
C. <small>
D. <big>
E. <strike>

7. 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.

8.

<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 video when the page loads.
D. It should not load the video when the page loads.
E. Error.

9. Which of the following attribute is used to specify the title of the text track in a <track> element?

A. caption
B. subtitle
C. kind
D. label
E. srclang

10. 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.

11. 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> declaration.
D. There can be any number of <!doctype> declaration.
E. None of the above.

12. Which of the following is not new element of HTML5?

A. <article>
B. <aside>
C. <bdi>
D. <command>
E. <big>

13. Which of the following is not new media element of HTML5?

A. <audio>
B. <video>
C. <object>
D. <source>
E. <track>

14. Which of the following browser doesn't support <video> tag?

A. Internet Explorer 9
B. Firefox
C. Opera
D. Chrome
E. All supports <video> tag.

15. 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

16. Which of the following attribute is used to specify the URL of the track file in a <track> element?

A. origin
B. source
C. subtile
D. src
E. url

17. Which of the following is not method of <video> element?

A. play()
B. pause()
C. load()
D. canPlayType
E. Above all are methods of the <video> element.

18. Which of the following is not property of <video> element?

A. abort
B. currentTime
C. currentSrc
D. videoWidth
E. duration

19. Which of the following attribute 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

20. 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.


21. 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 browser.
E. All of the above.

22. Which of the following is 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);

Note: Here e is ondrop event

23. 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.

24. Which event will fire when an element is dragged?

A. ondragoccure
B. ondragstart
C. ondragbegin
D. ondrag
E. ondragging

25. 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.

26. What is default behavior of browser 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.

27. Which method will use to get the dragged data?

A. dataTransfer.getdragdata
B. dataTransfer.getdragelement
C. dataTransfer.sedata
D. dataTransfer.gedata
E. dataTransfer.getdrop

28. 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" />

29. 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>

30. Which of the following is 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>

Answers: 

1. D
2. E
3. C
4. A
5. A
6. C
7. C
8. D
9. E
10. E
11. B
12. E
13. C
14. E
15. C
16. D
17. E
18. A
19. D
20. A

21. C
22. A
23. B
24. B
25. C
26. B
27. D
28. E
29. E
30. D

No comments:

Post a Comment