HTML5 Introduced by The Web Hypertext Application Technology Working Group ( WHATWG ) and World Wide Web Consortium (W3C) for helping web users and developer both as developer has no need to add numbers of plugin and library for showing thing like video, Audio/mp3, date select function , placeholder in input box, Canvas, 2D/3D Graphics, Local SQL Database etc and same place web users have no need to install adobe flash players type for viewing video thing and we are here introducing Top html5 interview questions and answers along with xhtml5,DOM2HTML,WHATWG,w3c,html4 ...
|Questions : 1||What is the difference between HTML and HTML5 ?|
|Answers : 1||HTML5 is nothing more then upgreaded version of HTML where in HTML5 Lot of new future like Video, Audio/mp3, date select function , placeholder , Canvas, 2D/3D Graphics, Local SQL Database added so that no need to do external plugin like Flash player or other library|
|Questions : 2||What is the <!DOCTYPE> ? Is it necessary to use in HTML5 ?
|Answers : 2||
The <!DOCTYPE> is an instruction to the web browser about what version of HTML the page is written in. AND The <!DOCTYPE> tag does not have an end tag and It is not case sensitive.
The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html> tag. As In HTML 4.01, all <! DOCTYPE > declarations require a reference to a Document Type Definition (DTD), because HTML 4.01 was based on Standard Generalized Markup Language (SGML). WHERE AS HTML5 is not based on SGML, and therefore does not require a reference to a Document Type Definition (DTD).
|Questions : 3||How many New Markup Elements you know in HTML5|
|Answer : 3||
Below are the New Markup Elements added in HTML5
|Questions : 4||What are the New Media Elements in HTML5? is canvas element used in HTML5|
|Answer : 4||
Below are the New Media Elements have added in HTML5
yes we can use Canvas element in html5 like below
|Questions : 5||Do you know New Input Type Attribute in HTML5|
|Answers : 5||
Yes we can use below new input type Attribute in HTML5
|Questions : 6||How to add video and audio in HTML5|
|Answers : 6||
Like below we can add video in html5
<video width="320" height="240" controls="controls">
<source src="song.ogg" type="audio/ogg" />
<source src="song.mp3" type="audio/mpeg" />
|Questions : 7||What the use of Canvas Element in HTML5|
<canvas id="pcdsCanvas" width="500" height="400"></canvas>
|Questions : 8||What is the use of localStorage in HTML5 ?|
|Answers : 8||
Before HTML5 LocalStores was done with cookies. Cookies are not very good for large amounts of data, because they are passed on by every request to the server, so it was very slow and in-effective.
In HTML5, the data is NOT passed on by every server request, but used ONLY when asked for. It is possible to store large amounts of data without affecting the website's performance.and The data is stored in different areas for different websites, and a website can only access data stored by itself.
And for creating localstores just need to call localStorage object like below we are storing name and address
|Questions : 9||What is the sessionStorage Object in html5 ? How to create and access ?|
|Answers : 9||