Answers and questions for HTML5 Test Upwork. You can have Top-10% score with our answers. Also we can help pass this test on Upwork.(Updated-November 2018)
TEST QUESTION AND ANSWERS:
1. Which HTML5 doctype declarations are correct?
Answers:
(a)<!doctype html>
(b) <!DOCTYPE html>
(c) <!DOCTYPE HTML5>
(d) <!DOCTYPE HTML>
(b) <!DOCTYPE html>
(c) <!DOCTYPE HTML5>
(d) <!DOCTYPE HTML>
Var obj={‘one’: 1, ‘two’:
2, ‘three’: 3};
Answers:
(a)localStorage.setItem(‘obj’,obj);
(b)localStorage.setItem(‘obj’,JSON.stringify(obj));
(c)localStorage.setItem(‘testObject’,JSON.parse(testObject));
(d) localStorage.setItem(obj);
(b)localStorage.setItem(‘obj’,JSON.stringify(obj));
(c)localStorage.setItem(‘testObject’,JSON.parse(testObject));
(d) localStorage.setItem(obj);
3. How can an HTML5
canvas size be changed so that it fits the entire window?
Answers:
(a)#myCanvas {height: 100%;
width: 100%;}
(b) <script type=»text/javascript»> function resize_canvas(){ canvas = document.getElementById(«canvas»); if (canvas.width < window.innerWidth) { canvas.width = window.innerWidth; } if (canvas.height < window.innerHeight) { canvas.height = window.innerHeight; } } </script>
(c) It depends upon the complexity of the canvas, and the frequency of redraws.
(d) Calling the JavaScript getWidth() function.
(b) <script type=»text/javascript»> function resize_canvas(){ canvas = document.getElementById(«canvas»); if (canvas.width < window.innerWidth) { canvas.width = window.innerWidth; } if (canvas.height < window.innerHeight) { canvas.height = window.innerHeight; } } </script>
(c) It depends upon the complexity of the canvas, and the frequency of redraws.
(d) Calling the JavaScript getWidth() function.
4. What is the
difference between Server-Sent Events (SSEs) and WebSockets in HTML5?
Answers:
(a) WebSockets
can perform bi-directional (client-server and vice versa) data transfers, while
SSEs can only push data to the client/browser.
(b) SSEs can perform bi-directional (client-server and vice versa) data transfers, while WebSockets can only push data to the client/browser.
(c)WebSockets and SSEs are functionally equivalent.
(d) None of these.
(b) SSEs can perform bi-directional (client-server and vice versa) data transfers, while WebSockets can only push data to the client/browser.
(c)WebSockets and SSEs are functionally equivalent.
(d) None of these.
5. 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?
Answers:
(a)<ahref=»mailto:webmaster@xcompany.com»>webmaster</a>
(b)<ahref=»webmaster@xcompany.com»>webmaster</a>
(c)<ahttp=»mail:webmaster@xcompany.com»>webmaster</a>
(d) <mail http=»send:webmaster@xcompany.com»>webmaster</mail>
(b)<ahref=»webmaster@xcompany.com»>webmaster</a>
(c)<ahttp=»mail:webmaster@xcompany.com»>webmaster</a>
(d) <mail http=»send:webmaster@xcompany.com»>webmaster</mail>
No comments:
Post a Comment