HTML 5 MCQs

HTML 5 MCQs

Our experts have gathered these HTML 5 MCQs through research, and we hope that you will be able to see how much knowledge base you have for the subject of HTML 5 by answering these multiple-choice questions.
Get started now by scrolling down!

1: What is a <b> tag used for?

A.   To define a push button

B.   To define italic text

C.   To define text with strong importance

D.   To define a (single) break

E.   To define bold text

2: What MIME-type must a cache manifest be served with?

A.   text/cache-manifest

B.   text/plain

C.   application/cache-manifest

D.   application/xml

3: How do you make an element draggable ?

A.  

<img draggable="allow" /> 

B.   <img draggable="true" />

C.   <img drag="allow" /> 

D.  

<img drag="true" />

4: What is a Web Worker?

A.   JavaScript script running in the background of the page

B.   Hundreds or thousands of these can be allocated in clusters to distribute work amongst common tasks on a web platform

C.   No correct answer

D.   JavaScript script embedded in the page, triggered by the user

5: Which of the following is NOT a benefit offered by using application cache?

A.   Offline browsing: users can navigate a site even when they are offline.

B.   Security: data stored within the cache is protected from external access.

C.   Reduced server load: the browser only downloads resources that have changed from the server.

D.   Speed: cached resources are local, and therefore faster.

6: Which of the following defines a visible heading for a <details> element?

A.   <progress>

B.   <figure>

C.   <details>

D.   <section>

E.   <summary>

7: Which method lets you access the canvas to start drawing on it?

A.   getCanvas();

B.   setCanvas() ;

C.   setContext();

D.   getContext();

8: What does minimizing HTML code get rid of?

A.   whitespace

B.   unclosed div tags

C.   bugs

D.   unloaded JavaScript

9: Search is a valid input type.

A.   True

B.   False

10: How will you return a reference to the parent of the current window or subframe in an HTML 5.0 web application?

A.   window.frameElement

B.   window.parent

C.   window.top

D.   None

11: You can force a scroll bar onto a page by using:

A.   all of these

B.   a right nav tag

C.   an aside tag

D.   CSS overflow

12: Is this correct or not ? <video width="320" height="240" controls="controls"> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> <source src="movie.webm" type="video/webm"> Your browser does not support the video tag. </video>

A.   Yes, it seems correct.

B.   No, the "controls" attribute can not be set to "controls".

C.   No, the "controls" attribute does not exists.

D.   No, you can not use 3 <source> in a single <video> tag.

E.   No, you can't directly add the text "Your browser does not support the video tag." in a <video> tag.

13: The method to draw a rectangle filled with current fill style is

A.   fillRect(x,y,z)

B.   fillRect(x,y,width,height)

C.   fillRect(width,height)

D.   fillRect(x,y)

14: The action attribute in a <form> element:

A.   none of these.

B.   Specifies a javascript snippet to be executed when the form is submitted.

C.   tells the browser what to do if an input field is invalid.

D.   specifies the URL of the service that will handle the submitted data.

15: What is not a new element in HTML5

A.   <figure>

B.   <aside>

C.   <nav>

D.   <figcaption>

E.   <img>

16: <applet> tag is not supported by HTML5. Which tag can you now use in place of <applet> ?

A.   <object>

B.   <abr>

C.   <em>

D.   <abbr>

E.   <address>

17: When using an <input type="email"> field many modern browsers will display a tool-tip warning for easier client-side form validation.

A.   False, client-side form validation is only possible with the use of JavaScript.

B.   False, form validation is only possible on the server.

C.   True, but this should not replace server-side validation.

18: The browser remembers data from a form and outputs it using:

A.   form overrides

B.   autofocus

C.   list

D.   autocomplete

19: What can HTML 5 forms NOT do?

A.   detect email addresses and phone numbers

B.   completely replace server side form validation

C.   validate forms

20: <nav> is an HTML5:

A.   pattern.

B.   box type.

C.   element.

D.   attribute.

21: Which tag would semantically separate a section of photos from a section of videos?

A.   <article>

B.   <section>

C.   <hgroup>

D.   <nav>

22: Which of the following is a not content-specific element in HTML5?

A.   <footer>

B.   <nav>

C.   <header>

D.   <narrow>

E.   <article>

23: To limit the length of input in a form field use:

A.   limit_value

B.   value="medium"

C.   medium

D.   maxlength

24: What does SVG stand for?

A.   Size Vector Graphics

B.   Scalable Vector Graphics

C.   Size Visable Graphics

D.   Size Vested Graphic

25: How many footers can you have in a html 5 document?

A.   any number

B.   2

C.   3

D.   20

26: What is the purpose of <em> tags?

A.   To define external interactive content

B.   To define a body element

C.   To define emphasized text

D.   To define a table caption

E.   To define bold text

27: Which browser does NOT support SSE (Server sent events)

A.   Google Chrome

B.   Opera

C.   Internet Explorer

D.   Firefox

E.   Safari

28: What does the <nav> element represent?

A.   the HTML5 replacement for the deprecated <a> element.

B.   the base URL specified with the location attribute.

C.   The <nav> element is not part of the HTML5 specification.

D.   a section of a page that links to other pages or to parts within the page.

29: Which is the correct DOCTYPE for HTML5?

A.   All of these

B.   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

C.   <!DOCTYPE html>

D.   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

30: Which of the following is correct?

A.   If an HTML5 document finds no stylesheet, it becomes invalid.

B.   HTML5 describes the content of a page while CSS defines style rules.

C.   It is best to style a webpage using the new HTML5 style properties.

31: What is the use of <kbd>?

A.   Defines keyboard input

B.   Defines broader container area

C.   Defines Important Text

D.   Defines a sample output from a computer program

E.   Defines a Definition Term

32: The process of giving all elements in a page a margin of 0 and padding of 0 is called a:

A.   recall

B.   reset

C.   reprocess

D.   reboot

33: Which attribute in <video> element is responsible for start playing as soon as it is ready?

A.   autoplay

B.   loop

C.   autorun

D.   fastload

E.   preload

34: HTML5 form validation will validate all specified field types and...

A.   email fields.

B.   url fields.

C.   time-date fields.

D.   required fields.

35: What is the proper syntax for adding placeholder text to a text input?

A.   <input placeholder=”Placeholder text” />

B.   <input>Placeholder text</input>

C.   <input value=”Placeholder text” />

D.   <input pre=”Placeholder text” />

36: Controls attribute in <video> element doesn't include

A.   Play button

B.   It includes all of the option.

C.   Pause button

D.   Seeking

E.   Volume

37: Which of the following languages will you use to paint the graphics designed using the HTML 5.0 <canvas> tag?

A.   VB script

B.   None

C.   JavaScript

D.   PostScript

38: What is the correct email input tag?

A.   <input type="text" name="email" />

B.   <input type="email" name="user_email" />

C.   <input type="Email" id="email" />

D.   <input type="text" id="email" />

39: Which of the following defines a part of a document, that would still make sense out of the context of its webpage (like a news article)?

A.   <rt>

B.   <article>

C.   <section>

D.   <mark>

E.   <details>

40: HTML5 was partially created by WHATWG and:

A.   Netscape

B.   XML

C.   W3C

D.   XHTML 2.0

41: Adding height and width to img elements can...

A.   prevent change in page layout when the image finishes loading.

B.   all of these.

C.   stretch an image.

42: You should insert text content between the <video> and </video> tags for browsers that do not support the <video> element.

A.   False

B.   True

43: When does the onhashchange event dispatches?

A.   If the entire URL changes.

B.   If the hash portion of the current URL changes.

44: What is the purpose of <svg> tags?

A.   To preformat pictures or text using Cascading Style Sheets

B.   To insert JavaScript content

C.   To draw pictures or text using Scalable Vector Graphics

D.   <svg> tags are not supported by HTML5

E.   To structure web pages

45: Which is the correct tag used for input fields, that contain a numeric value?

A.   <input type="text" min="1" max="10" />

B.   <input type="number" name="points" min="1" max="10" />

C.   <input type="text/number" name="points" id="text" min="1" max="10" />

D.   <input type="text" name="points" />

46: When you format images with <img> tags, which attribute do you not use?

A.   Type

B.   Enctype

C.   Bold

D.   Action

E.   All of these

47: <meta charset="utf-8" /> should be placed...

A.   at the very end of the file.

B.   right after the opening <head> tag.

C.   at the very beginning of the file.

D.   anywhere on the page

48: Which tag is used for describing details about a document?

A.   <section>

B.   <header>

C.   <figure>

D.   <details>

49: Which HTML tag should be used to contain each individual post on a page of blog posts?

A.   <aside>

B.   <div>

C.   <footer>

D.   <article>

50: Which tag specifies the caption inside a figure element?

A.   <figure>

B.   <figcaption>

C.   <command>

D.   <section>

51: How can audio files be played in HTML5? var sound = new Audio("file.wav");

A.   sound.begin()

B.   sound.resume();

C.   sound.play();

D.   sound.start();

52: AppCache, localStorage, and sessionStorage are forms of:

A.   HTML commands

B.   Standards

C.   Web storage

D.   Namespaces

53: The canvas element:

A.   replaces JavaScript

B.   works in conjunction with JavaScript

C.   does not work if the page is written in php

D.   only works with cold fusion

54: What Is the correct html 5 doc type declaration ?

A.   <!DOCTYPE = “HTML5”>

B.   <!DOCTYPE HTML5>

C.   <!DOCTYPE html>

D.   <HTML5>

55: Which of the following represents INVALID syntax for defining an attribute value in an HTML 5.0 document?

A.   <input name =’be evil’ />

B.   <input name=be evil />

C.   <input name = “be-evil" />

56: Which <body> tag event is fired when the user leaves the document?

A.   onundo

B.   onredo

C.   onerror

D.   onunload

57: Do all web browsers support all HTML5 features equally?

A.   Yes, except for Firefox

B.   Yes, except for Safari

C.   Yes

D.   No

E.   Yes, except for Google Chrome

58: In chrome, if you set an input field to autofocus, what will happen to the field when the user clicks into it?

A.   disappear

B.   light up

C.   become hidden

D.   become trackable

59: HTML5 offers two new objects which use JavaScript APIs for storing local data. These new objects are...

A.   cookies and locationObjects.

B.   cookies and sessionVariables.

C.   localStorage and sessionStorage.

60: What is Canvas?

A.   All of these

B.   It's a drawable region defined in HTML code with height and width attributes.

C.   It has several methods for drawing paths, boxes, circles, characters, and adding images.

D.   It's used to draw graphics, on the fly, via scripting

E.   It's a container for graphics

61: Using HTML5, what would be the most semantic way to group a section of ads?

A.   <mark>

B.   <aside>

C.   <header>

D.   <nav>

62: Which of the following should be used for entering urls?

A.   <input type="text/url" id="url" />

B.   <input type="text" id="user_url"/>

C.   <input type="url" name="user_url" />

D.   <input type="text" name="user_url" />

63: What attribute should you not assign to <img> tags?

A.   height

B.   src

C.   alt

D.   align

E.   width

64: In HTML5, which attribute is used to specify that an input field must be filled out?

A.   validate

B.   required

C.   formvalidate

D.   placeholder

65: What is the role of the <dfn> element in HTML5?

A.   It is used to define computer code text.

B.   It is used to define sample computer code.

C.   It is used to define a definition term.

D.   It is used to define important text.

66: How do you make an input tag checked? You add:

A.   input="checked"

B.   check="yes"

C.   checked="checked"

D.   this->check

67: What does the <details> tag do?

A.   Defines additional details that the user can view or hide

B.   Represents the progress of a task

C.   Defines a section in a document

D.   Defines additional data from other sites

E.   Defines a command button that a user can invoke

A.   True

B.   False

69: Does HTML5 use new tags not supported by HTML4?

A.   Only for Internet Explorer

B.   No

C.   Yes

D.   No, but it will

E.   Only XML type

70: video/ogg, video/mp4 and video/webm are all examples of:

A.   uStreams

B.   webisodes

C.   MIME types

71: Which of the following web browser doesn't support the muted attribute of <video> element?

A.   Google Chrome 6

B.   Opera 10.6

C.   Firefox 4.0

D.   Internet Explorer 9

72: Aside tags are useful for...

A.   secondary content

B.   right side content

C.   left side content

D.   main content

73: Which HTML5 tag would most semantically group a page title (in an H1 tag) and tagline (in an H2 tag)?

A.   <hgroup>

B.   <aside>

C.   <nav>

D.   <section>

74: A HTML5 SSE allow a web page to _________

A.   automatically gets updates from a server

B.   define a possible line-break

C.   use the location of a user's position

75: In HTML5, onblur and onfocus are:

A.   HTML elements

B.   Event attributes

C.   Style attributes

76: Which tag can be used inside the <details> tag?

A.   <aside>

B.   <summary>

C.   <version>

D.   <command>

77: A button that empties the form for the user to begin again is created with:

A.   <input type="reset"/>

B.   <input type="clear"/>

C.   <submit for="clear"/>

D.   <submit>reset</submit>

E.   <reset/>

78: A placeholder attribute in an input field...

A.   doesn't exist.

B.   holds the input field in place.

C.   sets default gray helper text for the field.

D.   creates even spacing between itself and other input fields.

79: True or False: The element <font> is a current element in HTML5.

A.   True

B.   False

80: Which of the following is an INVALID value for the type attribute of command tag?

A.   text

B.   command

C.   checkbox

D.   radio

81: What is the correct tag for independent and self-contained content?

A.   <nav>

B.   <menu>

C.   <aside>

D.   <article>

82: Which attribute in <video> element is responsible for play/pause button?

A.   preload

B.   It is default of <video> element.

C.   autoplay

D.   poster

E.   controls

83: A media element that allows for dynamic, scriptable rendering of images is:

A.   SVG

B.   2D API

C.   Bespin Application

D.   Canvas

A.   True

B.   False

85: The <figure> and <figcaption> elements were primarily added to the specification for what purpose?

A.   To allow developers to incorporate local storage of images

B.   To give users the ability to display block level images

C.   To offer a semantically correct markup for displaying image captions

D.   To deprecate the <img> and <span> tags

86: The _____ attribute specifies the elements text directionality.

A.   rtl

B.   auto

C.   dir

D.   ltr

87: The element <big> is a current element in HTML5.

A.   False

B.   True

88: To make a form submit you can use:

A.   <button type='submit'>

B.   <submit>

C.   <field for="data-submit"/>

D.   <form action="submit">

E.   <run>

A.   False

B.   True

90: Blockquote tags are:

A.   valid HTML5 mark-up

B.   used only for XML.

C.   have a limit of 256 characters.

D.   no longer valid in HTML5.

91: Height of the video player by <video> element depends:

A.   Width attribute

B.   Size attribute

C.   Size of media source

D.   Height attribute

E.   Poster attribute

92: What attribute makes a radio button or checkbox input selected?

A.   selected="true"

B.   checked="true"

C.   checked="checked"

D.   selected="selected"

93: Which of the following tags is used to define multiple media resources for <video> or <audio>?

A.   <embed>

B.   <source>

C.   <video>

D.   <audio>

E.   <track>

94: What do sections encapsulate?

A.   headers but not footers

B.   any valid mark-up or content

C.   divs only

D.   headers and footers only

95: How would an older (non-HTML5) browser handle an <input type=”email” /> element?

A.   Still display it as an email input

B.   Display it as a text input

C.   Not display it at all

D.   Display it as a textarea

96: What attribute(s) would you add to an <input type=”number” /> to set the maximum and minimum value for that input?

A.   range=”1,10”

B.   min=”1” max=”10”

C.   value=”1” maxvalue=”10”

D.   minimum=”1” maximum=”10”

97: What type of tag is not supported by HTML5?

A.   <form>

B.   <legend>

C.   <figcaption>

D.   <object>

E.   <font>

98: An example of a new HTML5 element would be:

A.   <strong>

B.   <object>

C.   <audio>

D.   <comment>

99: What is Application Cache?

A.   Enables a web application to copy the server logic to a local server, so it can be run without an internet connection.

B.   None of these

C.   Enables a web application to cache itself and make it readable without an internet connection.

100: True or false: <u> is deprecated in HTML5.

A.   True

B.   False