-
What are the new <input> types for form validation in HTML5?
The new input types for form validation are email, URL, number, tel, and date. Example:
-
What is the use of the required attribute in HTML5?
It forces a user to fill text on the text field or text area before submitting the form. It is used for form validation. Example:
-
How are tags migrated from HTML4 to HTML5?
No. Typical HTML4 Typical HTML5 1) <div id=”header”> <header> 2) <div id=”menu”> <nav> 3) <div id=”content”> <section> 4) <div id=”post”> <article> 5) <div id=”footer”> <footer> Header and Footer Example HTML 4 Header and Footer: HTML 5 Header and Footer: Menu Example HTML 4 Menu: HTML 5 Menu:
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.