What are the new <input> types for form validation in HTML5?
Answer:
The new input types for form validation are email, url, number, tel and date.
Example:
<input type="email">
View
What is the use of required attribute in HTML5?
Answer:
It forces user to fill text on textfield or textarea before submitting form. It is used for form validation.
Example:
Name: <input type="text" name="name" required>
View
If I do not put <!DOCTYPE html> will HTML 5 work?
Answer:
No, browser will not be able to identify that it is a HTML document and HTML 5 tags will not function properly.
ViewHow tags are migrated from HTML4 to HTML5?
Answer:
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:
<div id="header">
<h1>Monday Times</h1>
</div>
.
.
.
<div id="footer">
<p>© JavaTpoint. All rights reserved.</p>
</div>
HTML 5 Header and Footer:
<header>
<h1>Monday Times</h1>
</header>
.
.
.
<footer>
<p>© JavaTpoint. All rights reserved.</p>
</footer>
Menu Example
HTML 4 Menu:
<div id="menu">
<ul>
<li>News</li>
<li>Sports</li>
<li>Weather</li>
</ul>
</div>
HTML 5 Menu:
<nav>
<ul>
<li>News</li>
<li>Sports</li>
<li>Weather</li>
</ul>
</nav>
View
What is datalist tag?
Answer:
The HTML 5 datalist tag provides an auto complete feature on form element. It facilitates users to choose the predefined options.
ViewWhat does details and summary tag?
Answer:
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.
ViewWhat is button tag?
Answer:
The button tag is used in HTML 5. It is used to create a clickable button within HTML form on the web page. It is generally used to create a "submit" or "reset" button.
ViewWhat is the use of figure tag in HTML 5?
Answer:
The figure tag is used to add a photo in the document on the web page.
ViewWhat is the difference between progress and meter tag?
Answer:
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.
ViewIs audio tag supported in HTML 5?
Answer:
Yes. It is used to add sound or music files on the web page.
ViewWhich video formats are supported by HTML5?
Answer:
HTML 5 supports three types of video format:
Is there any need to change the web browsers to support HTML5?
Answer:
No. Almost all browsers (updated versions) support HTML 5. For example: Chrome, Firefox, Opera, Safari, IE etc.
ViewWhat are the different new form element types in HTML 5?
Answer:
Following is a list of 10 important new elements in HTML 5:
What is SVG?
Answer:
HTML SVG is used to describe the two dimensional vector and vector/raster graphics.
ViewWhat is canvas in HTML5?
Answer:
Canvas is an HTML area which is used to draw graphics.
ViewWhat is the use of iframe tag?
Answer:
An iframe is used to display a web page within a web page.
Syntax:
<iframe src="URL"></iframe>
Example:
<iframe src="demo_iframe.html" width="200px" height="200px"></iframe>
Target to a link:
<iframe src="http://www.javatpoint.com" name="iframe_a"></iframe>
View
What is the use of span tag? Give one example.
Answer:
The span tag is used for following things:
Example:
<p>
<span style="color:#ffffff;">
In this page we use span.
</span>
</p>
View
What are empty elements?
Answer:
HTML elements with no content are called empty elements. For example: <br>, <hr> etc.
ViewHow to make a picture a background image of a web page?
Answer:
To make a picture a background image on a web page, you should put the following tag code after the tag.
<body background = "image.gif">
Here, replace the "image.gif" with the name of your image file which you want to display on your web page.
ViewHow many tags can be used to separate section of texts?
Answer:
There are three tags used to separate the texts. i.e. usually <br> tag is used to separate line of texts. Other tags are<p> tag and <blockquote> tag.
View© 2017 QuizBucket.org