HTML5 Interview Questions
Let's see a list of top HTML5 interview questions and answers.
1. What is the canvas element in HTML5?
2. What is SVG?
HTML SVG is used to describe the two-dimensional vector and vector/raster graphics. SVG images and their behaviors are defined in XML text files. So as XML files, you can create and edit an SVG image with the text editor. It is mostly used for vector type diagrams like pie charts, 2-Dimensional graphs in an X, Y coordinate system.
3. What are the different new form element types in HTML 5?
Following is a list of 10 frequently used new elements in HTML 5:
4. Is there any need to change the web browsers to support HTML5?
No. Almost all browsers (updated versions) support HTML 5. For example Chrome, Firefox, Opera, Safari, IE.
5. Which type of video formats are supported by HTML5?
6. Is audio tag supported in HTML 5?
Yes. It is used to add sound or music files on the web page. There are three supported file formats for HTML 5 audio tag.
Let's see the code to play mp3 file using HTML audio tag.
Instead of koyal.mp3, you can pass any mp3 file name.
7. What is the difference between progress and meter tag?
The progress tag is used to represent the progress of the task only while the meter tag is used to measure data within a given range. More details.
8. What is the use of figure tag in HTML 5?
The figure tag is used to add a photo in the document on the web page. It is used to handle the group of diagrams, photos, code listing with some embedded content.
9. What is the use of figcaption tag in HTML 5?
The <figcaption> element is used to provide a caption to an image. It is an optional tag and can appear before or after the content within the <figure> tag. The <figcaption> element is used with <figure> element and it can be placed as the first or last child of the <figure> element.
10. What is button tag?
The button tag is used in HTML 5. It is used to create a clickable button within the HTML form on the web page. It is generally used to create a "submit" or "reset" button. Let's see the code to display the button.
11. What is the use of details and summary tag?
The details tag is used to specify some additional details on the web page. It can be viewed or hidden on demand. The summary tag is used with details tag. More details.
12. What is datalist tag?
The HTML 5 datalist tag provides an autocomplete feature on the form element. It facilitates users to choose the predefined options to the users to select data.
- Enter your favorite cricket player: Press any character<br />
- <input type="text" id="favCktPlayer" list="CktPlayers">
- <datalist id="CktPlayers">
- <option value="Sachin Tendulkar">
- <option value="Brian Lara">
- <option value="Jacques Kallis">
- <option value="Ricky Ponting">
- <option value="Rahul Dravid">
- <option value="Shane Warne">
- <option value="Rohit Sharma">
- <option value="Donald Bradman">
- <option value="Saurav Ganguly ">
- <option value="AB diVilliers">
- <option value="Mahendra Singh Dhoni">
- <option value="Adam Gilchrist">
13. How are tags migrated from HTML4 to HTML5?
|No.||Typical HTML4||Typical HTML5|
Header and Footer Example
HTML 4 Header and Footer:
HTML 5 Header and Footer:
HTML 4 Menu:
HTML 5 Menu:
14. If I do not put <!DOCTYPE html> will HTML 5 work?
No, the browser will not be able to identify that it is an HTML document and HTML 5 tags do not function properly..