HTML5 Test
Assuming that some text needs to be written on an HTML5 canvas, select a replacement for the commented line below: <canvas id="e" width="200" height="200"></canvas> <script> var canvas = documen...
Assuming that some text needs to be written on an HTML5 canvas, select a replacement for the commented line below: <canvas id="e" width="200" height="200"></canvas> <script> var canvas = document...
Can we store JavaScript Objects directly into localStorage?
Consider the following items of a <select> list: <option value="89">Item 1</option> <option value="90">Item 2</option> Which of the following values would be passed on by clicking the submit butt...
Consider the following items of a <select> list: <option value="89">Item 1</option> <option value="90">Item 2</option> Which of the following values would be passed on by clicking the submit button...
Consider the following JavaScript code: var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); var img=document.getElementById("img"); Which method will correctly draw an image in...
How can an HTML5 canvas size be changed so that it fits the entire window?
How can audio files be played in HTML5? var sound = new Audio("file.wav");
How does a button created by the <button> tag differ from the one created by an <input> tag?
In HTML5, which of the following is not a valid value for the type attribute when used with the <command> tag shown below? <command type="?">Click Me!</command>
Once an application is offline, it remains cached until the following happens (select all that apply):
The following are valid use cases of client file/directory access in HTML5, except:
The following link is placed on an HTML webpage: <a href="http://msdn.com/" target="_blank"> MSDN </a> What can be inferred from it?
True or False: HTML5 Canvas can be used to create images.
True or false: JavaScript objects can be stored directly into localStorage.
What does P2P streaming mean when web applications establish a P2P HTTP connection using HTML?
What is the difference between Server-Sent Events (SSEs) and WebSockets in HTML5?
What is the internal/wire format of input type="date" in HTML5?
What is the limit to the length of HTML attributes?
What is the purpose of the <q> element in HTML5?
What is the role of the <dfn> element in HTML5?
When does the ondragleave mouse event get fired in HTML5?
Which event is fired when an element loses its focus in an HTML5 document?
Which following are valid default values for the <input type="date"> HTML5 element?
Which HTML5 doctype declarations are correct?
Which is the standard method for clearing a canvas?
Which media event is triggered when there is an error in fetching media data in HTML5?
Which media event will be fired when a media resource element suddenly becomes empty?
Which method of HTMLCanvasElement is used to represent image of Canvas Element?
Which method of the HTMLCanvasElement is used to represent an image of a canvas element?
Which of the following <link> attributes are not supported in HTML5?
Which of the following are sample use cases for HTML5 web workers?
Which of the following are the valid values of the <a> element's target attribute in HTML5?
Which of the following are true about the ARIA role attribute in HTML5?
Which of the following are valid ways to associate custom data with an HTML5 element?
Which of the following attributes gets hidden when the user clicks on the element that it modifies? (Eg. hint text inside the fields of web forms)
Which of the following code is used to prevent Webkit spin buttons from appearing on web pages?
Which of the following examples contain invalid implementations of the ampersand character in HTML5?
Which of the following HTML5 features is capable of taking a screenshot of a web page?
Which of the following is a possible way to get fullscreen video played from the browser using HTML5?
Which of the following is not a valid attribute for the <video> element in HTML5?
Which of the following is not a valid syntax for the <link> element in HTML5?
Which of the following is the best method to detect HTML5 Canvas support in web browsers?
Which of the following is the best method to store an array in localStorage?
Which of the following is the correct way to check browser support for WebSocket?
Which of the following is the correct way to display a PDF file in the browser?
Which of the following is the correct way to play an audio file in HTML5?
Which of the following is the correct way to store an object in a localStorage?
Which of the following is the correct way to store an object in localStorage? var obj = { 'one': 1, 'two': 2, 'three': 3 };
Which of the following methods can be used to estimate page load times?
Which of the following shows correct use of client-side data validation in HTML5, on username and password fields in particular?
Which of the following statements are correct with regard to the <hr> and <br> elements of HTML5?
Which of the following statements regarding WebSockets is true?
Which of the following video file formats are currently supported by the <video> element of HTML5?
Which of the following video tag attributes are invalid in HTML5?
Which of the following will detect when an HTML5 video has finished playing?
Which of the following will restrict an input element to accept only numerical values in a text field?
You are writing the code for an HTML form and you want the browser to retain the form's input values. That is, if a user submits the form and presses the browser's back button, the fully populated ...
You want to create a link for your website allowing users to email the webmaster. How will you implement this if the webmaster's email address is webmaster@xcompany.com?
Consider the following JavaScript code: var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); var img=document.getElementById("img"); Which method will correctly draw an image in the x=10, y=10 position?
Which of the following are valid HTML5 elements?
Which of the following are possible ways to make the browser automatically adds new images and discards deleted images with server-side events in HTML5?
Which of the following methods are valid for navigating to a fragment identifier? http://demo.com/#foo
You are writing the code for an HTML form and you want the browser to retain the form's input values. That is, if a user submits the form and presses the browser's back button, the fully populated form is displayed instead of a blank form. Which of the following HTML 5 attributes will you use?

Consider the following items of a <select> list:

<option value="89">Item 1</option>
<option value="90">Item 2</option>

Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?

Which of the following input element variations will show a numeric keypad in mobile browsers?
What is the best way to define the character set of an HTML5 web page?
Which of the following <section> elements have the correct attribute assignment as per HTML5?
What is the proper syntax for a line break tag as W3C specs defines?
Which of the following is an invalid value for the type attribute of a command tag?

Assuming that some text needs to be written on an HTML5 canvas, select a replacement for the commented line below:

<canvas id="e" width="200" height="200"></canvas>
<script>
  var canvas = document.getElementById("e");
  //insert code here
  context.fillStyle = "blue";
  context.font = "bold 16px Arial";
  context.fillText("Zibri", 100, 100);
</script>
Which of the following is a standard method for clearing the Canvas? var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d");
Which of the following are valid values for the contenteditable attribute of the <figure> element in HTML5?