Showing posts with label Web Designing. Show all posts
Showing posts with label Web Designing. Show all posts
Sunday, 22 March 2015

Test answers for HTML5 Test 2015


1. Which of the following statements regarding WebSockets is true?
Answers:
• It communicates with the server with only the data required by the application.
• It lowers the latency of connections for interactive web applications.
• It scales better and consumes less server resources than HTTP AJAX/long-poll.
• All of the above.

2. 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>
Answers:
• var context = canvas.getContext();
• var context = canvas.getElementById("context");
• var context = canvas.getContext("2d");
• var context = canvas.getElementById("2d");

Test answers for XHTML 1.0 Test 2015



1. Which of the following is incorrect with regard to the <select> tag?
Answers:
• The "name" should be specified
• The "disabled" attribute disables the drop-down list
• The "multiple" attribute allows the user to choose multiple options
• The text specified in the "value" is displayed in the drop-down list

2. You have defined the following image in an XHTML document:
<img src="/image/logo.gif" alt="" id="img1" />
Answers:
• The code will only work properly in a browser that supports XHTML
• The code will work properly in a browser that supports both HTML 4.x and XHTML
• The code will only work properly in a browser that supports HTML 4.x
• The code is incorrect, it will not work in any browser