Html5 interview question



Html Interview Question & Answers
.

Q-1. What are the new features introduced in HTML5?
Answer.
HTML5 introduces a number of new elements and attributes that help in building an attractive webSite, that we see nowadays.

It supports following new features.

New Semantic Elements  These are like <header><footer>, and <section>.
Forms 2.0 – It contains improvements to HTML web forms. It has introduced new attributes for  the <input> tag.
Persistent Local Storage  With HTML5, it is possible to achieve this, without resorting to third-party plugins.
WebSocket – It facilitates setting up a bidirectional communication for web applications.
Server-Sent Events(SSE)  These events got introduced in HTML5. The direction of the flow of the execution  of these events is from the server to the Web Browser.
Canvas – It supports a two-dimensional drawing surface that is programmable using JavaScript.
Audio & Video – It allows embedding audio or video on the web pages without resorting to third-party plugins.
Geolocation – It facilitates the visitors to share their physical location with the web  application.
Microdata – It allows building our personal vocabulary beyond HTML5 and extends our web pages  with those custom semantics.
Drag and drop – It supports to Drag and drop the items from one location to another location on the same Web page.



Q-2. What would happen if the HTML Document does not contain <!DOCTYPE>?
Answer.
It instructs the Web Browser about the version of HTML used for creating the Web  page.
If the developer misses declaring the DOCTYPE information in the code, then new  features and tags provided by HTML5, like <article><footer>, and <header> will not be supported. Additionally, the Browser may automatically go into Quirks or Strict Mode.



Q-3. What is a tag in HTML?
Answer.
A tag instructs the Browser about how to format the HTML properly. When you write  an HTML page, you enter tags for many reasons to change the appearance of text,  to show a graphic, or to make a link to another page. HTML uses symbols like “<” and “>”  to enclose the tags. And symbol “\” for closing the tag.



Q-4. What is the difference between HTML elements and tags?
Answer.
HTML elements communicate to the Browser how to represent the text. They become  HTML tags when enclosed within angular brackets <>.



Q-5. What are the various elements provided by HTML5 for media content?
Answer.
HTML provides the support of following elements for representing the media content.

<audio> – It defines the sound content.
<video> – It represents the video content that needs to be attached to a Web page.
<source> – This tag defines the source of video and audio.
<embed > – It provides a container for an external application.
<track> – It defines text tracks for video and audio.




Comments

Post a Comment

please do not enter any spam link in the comment box