HTML5 supports rich media controls to incorporate video by using the <video> element and <audio> element.
<video> supports multiple media formats by using <source>
<canvas> and <svg> elements support a rich API to create both simple and complex graphics in the browser.
Both <canvas> and <svg> graphics can draw text, lines, shapes, fonts, fills, and gradients
The <canvas> element is drawon on via JS by getting a reference to the context
The <svg> element renders graphics by using a declarative syntax.
Which of the following JS methods can't be used to select an element in the DOM?
getElementById, querySelector, getElementByClassName, queryAll
Which line of JS successfully reetrieves only the image element with the ID myDog from the following HTML?
To hide an element in the DOM and still be able to add it back later, what should you do?
-Nothing, because the DOM is always available in a static form.
-Keep a reference to the removed node to be able to add it back.
-Call the document.restoreNodes method.
-You can't add an element back after it's removed.
When implementing the HTML5 video element, how do you ensure that the rendering of the element can function in different browsers?
-You need to do nothing because HTML5 is now a standard specification.
-Specify all the source video types in the src attribute of the video element.
-Include the <source> element for each video type so that each browser can play the version is supports.
-Include the <object>element for each video type so that the browser can play the version it supports.
When drawing on the HTML5<canvas> element, what method is used on the context to begin drawing at a new point:
When performance is critical for an HTML5 graphics applicationwhat should you use?
-<canvas>using a declarative syntax to create the graphics
-<svg>using a declarative syntax to create the graphics.
-<canvas> using JS to create the graphics
-<svg> and <canvas> combination to leverage the best performance