HTML 5 MCQS

All Questions for: HTML 5 MCQS

Question 1: __________ defines the accelerator key to be used for keyboard access to an element.

  • A command
  • B rp
  • C accesskey
  • D data-X

Explanation: The accesskey attribute specifies a shortcut key to activate/focus an element.

Question 2: The canvas element has a DOM method it is called.

  • A None of the above
  • B getElement
  • C getId
  • D getContext

Explanation: No explanation is given for this question

Question 3: Which is not suited for game applications?

  • A Both A & B
  • B Canvas
  • C None of the above
  • D Svg

Explanation: No explanation is given for this question

Question 4: Which of the following was not previous layout mode?

  • A Block
  • B Positioned
  • C Inline
  • D Flexbox layout

Explanation: No explanation is given for this question

Question 5: There is an audio format supported across all browsers.

  • A False
  • B True

Explanation: There are 3 formats that are used in HTML5 Audio and are .mp3, .m4a AAC also known as H.264 format.

Question 6: Which element contains major navigational block?

  • A <nav>
  • B <header>
  • C <address>
  • D <footer>

Explanation: No explanation is given for this question

Question 7: Subtitle tracks and caption tracks to be specified for audio and video elements can be added using which of the following element?

  • A stable
  • B sink
  • C caption
  • D track

Explanation: The track element enables supplementary media tracks such as subtitle tracks and caption tracks to be specified for audio and video elements.

Question 8: Which of the following element is removed by HTML5?

  • A dir
  • B marginwidth
  • C vlink
  • D compact

Explanation: dir is rarely used, and provides similar functionality to unordered lists.

Question 9: Which property of SVG restricts the region to which paint can be applied?

  • A clip-Path
  • B radialGradient
  • C animateTransform
  • D linearGradient

Explanation: A clipping path is defined with a clipPath element. A clipping path is used/referenced using the clip-path property.

Question 10: The ____________ method must fill all the subpaths of the current path, using fillStyle, and using the non-zero winding number rule.

  • A clip()
  • B stroke()
  • C fill()
  • D none of the mentioned

Explanation: The fill() method fills the current drawing (path).The default color is black.

Question 11: A semantic element clearly describes its meaning to

  • A Both A & B
  • B Developer
  • C None of the above
  • D Browser

Explanation: No explanation is given for this question

Question 12: Which element is used to define a discrete unit of content such as a blogpost, comment, and so on?

  • A section
  • B class
  • C none of the mentioned
  • D article

Explanation: The article tag contains a standalone piece of content that would make sense if syndicated as an RSS item, for example a news item.

Question 13: What will happen if height and width of video are not set while video loads?

  • A page does not load
  • B page crash
  • C page flickers
  • D none of the mentioned

Explanation: If height and width are not set, the browser does not know the size of the video. The effect will be that the page will change (or flicker) while the video loads.

Question 14: A ____________ element must have a start tag but must not have an end tag.

  • A details
  • B both a and b
  • C code
  • D command

Explanation: The command tag is new in HTML5 and specifies a normal command with an action.

Question 15: To draw on the canvas, authors must first obtain a reference to a context using the ______________ method of the canvas interface element.

  • A getData
  • B none of the mentioned
  • C getContext
  • D toDataURL

Explanation: contextType is a DOMString containing the context identifier defining the drawing context associated to the canvas.

Question 16: Which of the following attribute adds audio controls, like play, pause, and volume?

  • A source
  • B controls
  • C audio
  • D src

Explanation: The controls attribute is a boolean attribute. When present, it specifies that audio controls should be displayed.

Question 17: What is the replacement for cookies in HTML5?

  • A Java scripts
  • B Local Storage
  • C Web beacons
  • D All the above

Explanation: No explanation is given for this question

Question 18: In HTML Audio/Video DOM, __________ sets or returns whether the audio/video should start over again when finished.

  • A autoplay
  • B seeking
  • C played
  • D loop

Explanation: The loop attribute is a boolean attribute. When present, it specifies that the audio will start over again, every time it is finished.

Question 19: Which property is used to align flex items?

  • A justify-content
  • B align-items
  • C flex-grow
  • D align-content

Explanation: No explanation is given for this question

Question 20: Which element represents a control for generating a public-private key pair?

  • A key
  • B command
  • C ins
  • D keygen

Explanation: The keygen element represents a control for generating a public-private key pair and for submitting the public key from that key pair.

Question 21: Which tag is used to encapsulate navigation and then style the elements appropriately as menu items?

  • A ul
  • B nav
  • C li
  • D both a and b

Explanation: Conventionally, many Web developers have used and tags to encapsulate navigation and then styled the elements appropriately as menu items. This seems to introduce quite a bit of ambiguity in markup because it may be difficult to determine the difference between a list that has links in it and a list that is simply navigation.

Question 22: An API is an application programming interface consisting of methods and properties which allow the author to get or set data or execute commands to the user agent.

  • A True
  • B False

Explanation: API, an abbreviation of application program interface, is a set of routines, protocols, and tools for building software applications.

Question 23: State true or False.

  • A True
  • B False

Explanation: Traditionally,multimedia has been inserted with the embed and object elements, particularly when inserting Adobe Flash, Apple QuickTime, Windows Media, and other formats.

Question 24: Which element(s) represents a section of a document that links to other documents?

  • A navigation
  • B option
  • C anchor tag
  • D nav

Explanation: The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links.

Question 25: Which of the following browser does not support wav file format?

  • A Opera
  • B Chrome
  • C Internet Explorer
  • D Firefox

Explanation: IE(Internet Explorer) does not support wav and Ogg file format.

Question 26: SVG also stands for Scalar Vector Graphics

  • A False
  • B True

Explanation: SVG stands for Scalable Vector Graphics

Question 27: Which of the following is/are the property of SVG images?

  • A SVG images are zoomable
  • B SVG images are scalable
  • C All of the mentioned
  • D SVG is an open standard

Explanation: Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation.

Question 28: Which of the following is not a newly added element in HTML5?

  • A audio
  • B article
  • C nav
  • D frameset

Explanation: frameset is usability concerns.

Question 29: Which of the following statement is not true?

  • A All of the mentioned
  • B SVG is used to define graphics for the Web
  • C SVG is a W3C recommendation
  • D SVG stands for Scalable Vector Graphics

Explanation: All the statements regarding SVG are true.

Question 30: __________ is a JavaScript library that implements the most common user interface elements and interactions like sliders, accordions, tabs, and so on.

  • A VTS
  • B JQuery UI
  • C JavaScript
  • D JCL

Explanation: jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.

Question 31: The ____________ method must create a new clipping region by calculating the intersection of the current clipping region and the area described by the current path, using the non-zero winding number rule.

  • A stroke()
  • B none of the mentioned
  • C fill()
  • D clip()

Explanation: The clip() method clips a region of any shape and size from the original canvas.

Question 32: In HTML Audio/Video DOM, __________ sets or returns the CORS settings of the audio/video.

  • A currentTime
  • B crossOrigin
  • C duration
  • D defaultPlaybackRate

Explanation: The purpose of the crossorigin attribute is to allow you to configure the CORS requests for the element

Question 33: The HTML canvas is a

  • A Three-dimensional grid
  • B One-dimensional grid
  • C Two-dimensional grid
  • D None of the above

Explanation: No explanation is given for this question

Question 34: Which of the following HTML Video

  • A Ogg
  • B MP4
  • C None of the mentioned
  • D WebM

Explanation: The Ogg container format with the Theora video codec and the Vorbis audio codec is supported in desktop/mobile Gecko (Firefox), Chrome, and Opera, and support for the format can be added to Safari (but not on iOS) by installing an add-on. The format is not supported in Internet Explorer in any way.

Question 35: Which property defines in which direction the container wants to stack flex items?

  • A flex-flow
  • B flex-wrap
  • C align-content
  • D flex-direction

Explanation: No explanation is given for this question

Question 36: Header element does not contain . . . . . . . .

  • A authorship information
  • B heading elements
  • C logo
  • D <address>

Explanation: No explanation is given for this question

Question 37: Which of the following specifies initial length of flex item?

  • A flex-flow
  • B flex-grow
  • C flex-shrink
  • D flex-basis

Explanation: No explanation is given for this question

Question 38: Which of the following allows the sandboxed iframe to run scripts from the same domain?

  • A allow-same-origin
  • B allow-scripts
  • C none of the mentioned
  • D allow-forms

Explanation: The sandbox attribute enables an extra set of restrictions for the content in the iframe.

Question 39: What more needs to be achieved to fulfil the promises of the Open Web Platform?

  • A Media and Real-Time Communications
  • B Performance and Tuning
  • C All of the mentioned
  • D Security and Privacy

Explanation: W3C CEO Jeff Jaffe states that

Question 40: The interactive element audio with the attribute controls must not appear as a descendant of which element?

  • A button
  • B a
  • C audio
  • D both a and b

Explanation: The anchor and the button tag acts as link which cannot be a parent of audio element.

Question 41: State whether the given statement is true or false.

  • A False
  • B True

Explanation: The World Wide Web Consortium (W3C) published a Recommendation of HTML5, the fifth major revision of the format used to build Web pages and applications, and the cornerstone of the Open Web Platform.

Question 42: In HTML Audio/Video DOM, __________ returns a MediaError object representing the error state of the audio/video.

  • A error
  • B ended
  • C mediaGroup
  • D seeking

Explanation: The error property returns a MediaError object. The MediaError object has a code property containing the error state of the audio/video.

Question 43: Which method is used to increase or decrease the units in a canvas grid.

  • A Canvas Composition
  • B Canvas Transform
  • C Canvas Rotation
  • D Canvas Scaling

Explanation: No explanation is given for this question

Question 44: All elements are identified by their __________ and are marked up using either start tags and end tags or self-closing tags

  • A tag name
  • B none of the mentioned
  • C class name
  • D attribute name

Explanation: The tagName property returns the tag name of the element. In HTML, the returned value of the tagName property is always in UPPERCASE.

Question 45: The ___________ method must add the scaling transformation described by the arguments to the transformation matrix.

  • A none of the mentioned
  • B translate(x, y)
  • C rotate(angle)
  • D scale(x, y)

Explanation: HTML5 canvas provides scale(x, y) method which is used to increase or decrease the units in our canvas grid.

Question 46: Which of the following type attributes of input element defines control for entering a telephone number?

  • A mobile
  • B tel
  • C mob
  • D telephone

Explanation: The input element with a type attribute whose value is

Question 47: The _________ element is used to render simple graphics such as line art, graphs, and other custom graphical elements on the client side.

  • A css
  • B canvas
  • C metadata
  • D art

Explanation: The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images.

Question 48: ___________ contains the navigation menu, or other navigation functionality for the page.

  • A aside
  • B header
  • C section
  • D nav

Explanation: The nav element is for marking up the navigation links or other constructs (eg a search form) that will take you to different pages of the current site, or different areas of the current page.

Question 49: Which method retrieves periodic updates about the current geographic location of the device.

  • A All the mentioned above
  • B watchPosition()
  • C getCurrentPosition()
  • D clearWatch()

Explanation: No explanation is given for this question

Question 50: Which of the following attribute is used to display date/time content?

  • A time
  • B date
  • C year
  • D datetime

Explanation: To provide both human and machine-friendly date/time content, the element supports a datetime attribute, which should be set to the previously mentioned date format of YYYY-MM-DDThh:mm:ssTZD.