Monday, January 28, 2013

HTML (HyperText Markup Language) Quiz

HTML5 is the upcoming HTML standard. It introduces a number of new features like built-in video support, geolocation, drawing and so on. It also integrates XHTML, CSS and JavaScript. Check your awareness of HTML5 with this short quiz which is created using HTML5. Each question has one best answer. Your score will always be visible in the bottom left. Please use the latest version of an A-class browser like Chrome, Firefox or Internet Explorer to view this post. The latest versions of these browsers already implement a lot of HTML5 features.

1. Using HTML5, where can the <header> and <footer> tags be used?
within a document
within a section
within an article
all of the above

2. What is the preferred way of styling alternating rows in a table or document differently?
Use nth-child(even) and nth-child(odd) in CSS.
Assign alternating rows to two different classes and style those classes differently in CSS.
Use JavaScript to loop the rows and apply styles.
Apply inline styles within the document.

3. How can you round the corners of a rectangle in HTML5?
Use corner property.
Use border-radius property.
Use border property and specify rounded style.
None of the above

4. Which CSS property is used to stretch, rotate or skew an HTML5 element?

5. Which canvas method creates a rectangle with an outline only (i.e. not solid)?

6. In drawing upon a canvas, what is the alpha value?
The starting value of a property
The first parameter value in a function call
The opacity value or transparency value
None of the above

7. Which of the following is a valid attribute set for the video tag in HTML5?
src, controls, autoplay, loop
src, controls, fullscreen, height
height, width, muted, format
height, width, src, onload

8. In HTML5, which object is used to store data on the client even when the user closes the browser and restarts the computer?
Storage object
localStorage object
sessionStorage object
None of the above

9. Which method is used to get a user's latitude and longitude in HTML5 geolocation?
None of the above

10. In HTML5, what is the main benefit of using a web worker?
It runs on the server, freeing up the client resources.
The web worker is faster because of its automatic reference to the document object.
The work done by the web worker is automatically wrapped in a transaction.
The web worker runs in the background keeping the web page responsive.

Score is 0/ 10.