Hi, Today I am sharing with you oDesk HTML 5 Test Answers 2014. There are all information is correct.
So, Friends enjoy this post and if you have another information about this test answer.
Please post a comment and share your experience with us.
So, Friends enjoy this post and if you have another information about this test answer.
Please post a comment and share your experience with us.
- 1. 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 herecontext.fillstyle = “blue”;context.font = “bold 16px Arial”;context.fillText (“Zibri”, 100, 100);</script>
Ans: c. var context = canvas.getContext(“2d”);2. Can we store JavaScript Objects directly into localStorage?Ans: b. No3. For 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?Ans: b. 904. 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?
Ans:a. Ctx.drawImage(img, 10, 10);5. How can an HTML5 canvas size be changed so that it fits the entire window?
Ans: b. <script type=”text/javascript”>function resize_canvas() {canvas = document.gatElementById(“”canvas);if (canvas.width < window.innerWidth){Canvas.width = window.innerWidth;}if (canvas.height < window.innerHeight){Canvas. height = window.innerHeight;}}</script>6. How can audio files be played in HTML5?var sound = new Audio("file.wav");
Ans: d. Sound.play();7. How does a button created by the <button> tag differ from the one created by an <input> tag?Ans: d. A button tag can include images as well.8. 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>Ans: a. Button9. Once an application is offline, it remains cached until the following happens (select all that apply):Ans: b. The manifest file is modified10. The following are valid use cases of client file/directory access in HTML5, except:Ans: c. Use of HTML5 File API11. The following link is placed on an HTML webpage:<a href="http://msdn.com/" target="_blank"> MSDN </a>What can be inferred from itb. It will open the site msdn.com in a new window.12. True or False:HTML5 Canvas can be used to create images.Ans: a. True13. What does p2p streaming mean when web applications establish a p2p HTTP connection using HTML?
Ans: a. It means that streaming of a voice/video frame is direct, without using any server between them.14. What is the difference between server-sent Events (SSEs) and websockets in HTML?Ans: a. Websockets can perform bi-directional (client-server and vice versa) data transfers, while SSEs can only push data to the client/browser.15. What is the internal/wire format of input type=”date” in HTML5?Ans: a. YYYY-MM-DD16. What is the limit to the length of HTML attributes?Ans: a. There is no limit17. What is the role of the <dfn> element in HTML5?Ans: b. It is used to define a definition term18. When does the ondragleave mouse event get fired in HTML5?Ans:b. It gets fired when an element leaves a valid drop target19. Which event is fired when an element loses its focus in an HTML5 document?Ans:c. Onblur20. Which following are valid default values for the <input type="date"> HTML5 element?Ans: b. 2013-05-3021. Which HTML5 doctype declarations are correct?Ans: c. <!DOCTYPE html>22. Which is the standard method for clearing a canvas?Ans: a. context.clearRect ( x, y, w, h);23. Which media event is triggered when there is an error in fetching media data in HTML5?Ans: a.Onstalled24. Which media event will be fired when a media resource element suddenly becomes empty?Ans: c. Onemptied25. Which method of HTMLCanvasElement is used to represent image of Canvas Element?Ans: a. toDataURL()26. Which of the following <link> attributes are not supported in HTML5?Ans: a. Rev, d.charset27. Which of the following are sample use cases for HTML5 web workers?Ans: d. All of these28. Which of the following are the valid values of the <a> element's target attribute in HTML5?Ans: a._blankb. _selfc. _top
0 comments:
Post a Comment