Logo F2FInterview

HTML5 Interview Questions

Q   |   QA
‹‹ previous12345

HTML5 is nothing more then upgraded 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

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).

Below are the New Markup Elements added in HTML5

Tag Description
<article>Specifies independent, self-contained content, could be a news-article, blog post, forum post, or other articles which can be distributed independently from the rest of the site.
<aside>For content aside from the content it is placed in. The aside content should be related to the surrounding content
<bdi>For text that should not be bound to the text-direction of its parent elements
<command>A button, or a radiobutton, or a checkbox
<details>For describing details about a document, or parts of a document
<summary>A caption, or summary, inside the details element
<figure><figure>
<figcaption>The caption of the figure section
<footer>For a footer of a document or section, could include the name of the author, the date of the document, contact information, or copyright information
<header>For an introduction of a document or section, could include navigation
<hgroup>For a section of headings, using <h1> to <h6>, where the largest is the main heading of the section, and the others are sub-headings
<mark>For text that should be highlighted
<meter>For a measurement, used only if the maximum and minimum values are known
<nav>For a section of navigation
<progress>The state of a work in progress
<ruby>For ruby annotation (Chinese notes or characters)
<rt>For explanation of the ruby annotation
<rp>What to show browsers that do not support the ruby element
<section>For a section in a document. Such as chapters, headers, footers, or any other sections of the document
<time>For defining a time or a date, or both
<wbr>Word break. For defining a line-break opportunity.

Below are the New Media Elements have added in HTML5

Tag Description
<audio>For multimedia content, sounds, music or other audio streams
<video>For video content, such as a movie clip or other video streams
<source>For media resources for media elements, defined inside video or audio elements
<embed>For embedded content, such as a plug-in
<track>For text tracks used in mediaplayers

yes we can use Canvas element in html5 like <canvas></canvas>

Yes we can use below new input type Attribute in HTML5

TypeValue
telThe input is of type telephone number
searchThe input field is a search field
urla URL
emailOne or more email addresses
datetimeA date and/or time
dateA date
monthA month
weekA week
timeThe input value is of type time
datetime-localA local date/time
numberA number
rangeA number in a given range
colorA hexadecimal color, like #82345c
placeholderSpecifies a short hint that describes the expected value of an input field

‹‹ previous12345

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: