Showing posts with label Top 20 HTML5 Interview Questions. Show all posts
Showing posts with label Top 20 HTML5 Interview Questions. Show all posts

Friday, 21 August 2015

HTML5 Interview Questions and Answers for Experienced basic advanced 2015-2016

HTML5 Interview Questions and Answers for Experienced basic advanced 2015-2016,HTML5 Interview Questions and Answers 2015,Top 20 HTML5 Interview Questions,HTML5 Interview Questions & Answers,HTML5 Interview Questions and Answers For Freshers and Experienced, HTML5 Frequently Asked Interview Questions,Freshers Latest HTML5 Technical Interview Questions & Answers,F2F Interview,HTML5, Interview Questions & Answers,What would be some common HTML5 interview questions,HTML5 interview questions and answers for 2 years,HTML5 Developer Interview Questions,10 Common face to face HTML5 interview questions and answers,HTML5 Interview Questions and Answers,Top 10 HTML5 Interview Questions and Answers 2015,HTML5 (CMS)Interview Question Answer,Technical HTML5 Interview Questions and Answers for getting Job,Where can I find good HTML5 interview questions,HTML5 job interview questions and answers for freshers,HTML5 interview questions and answers for experienced,10 Tough HTML5 Interview Questions With Smart Answers,HTML5 interview questions and answers for experienced,How to Answer HTML5 Interview Questions,Where can I find good HTML5 interview questions ,Download HTML5 Interview Questions.

What are the new API introduced in HTML5? Name a few.

Below are some new APIs provided in HTML5 that was not available in earlier versions.

Media API
Data Transfer API
User Interaction
Text Track API
Application Cache API
History API
Constraint Validation API
Command API


What is file extension of HTML5?

.html


Question: What is initilize date of Html5?

28 October 2014


Question: What are the new features in HTML5?

Following are new features in HTML5

Local storage.
New form controls like calendar, date, time, email, URL and search etc.
canvas element is provided for 2D drawing.
video and audio elements for media playback.
New elements are provided. For e.g. article, header, footer, nav, section.


what are Semantic Elements?

A semantic element explicitly describes its meaning to both the browser and the developer.

A couple of examples of non-semantic elements are : <div> and <span> – which suggests nothing about their content.

Some examples of semantic elements are : <form>, <table>, and <img> – which clearly defines their contents.


Name new semantic elements in HTML5?



HTML5 introduced new semantic elements to define different parts of a web page.

Some of them are :

<figure>
<footer>
<header>
<main>
<article>
<aside>
<details>
<figcaption>


What are the various elements provided by HTML 5 for media content?

audio - It defines sound content.
video - It defines a video.
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 videoand audio.


What are the various tags provided for better structuring in HTML5?

figure - This tag specifies content like illustrations, diagrams, photos, code listings etc.
figcaption - It is used to provide a caption for a figure element .
footer - This tag defines a footer for a document or section.
header - This tag is used to define a header for a document .
hgroup - When there are multiple levels in a heading, it groups a set of h1 to h6 elements.
mark - It defines highlighted text.
article - This tag defines an article.
rt - It defines an explanation/pronunciation of characters for East Asian typography.
rp - This tag tells the system what to display in browsers that do not support ruby annotations.
section - It defines a section in a document.
summary - It provides a visible heading for a details element.
time - This tag defines a date/time.
aside - It defines content other than the page content.
bdi - This tag isolates a part of text for formatting.
command - It defines a command button to be invoked by the user.
details - It defines additional details that can be viewed .
dialog - It defines a dialog box.
meter - It defines a scalar measurement within a known range.
nav - It defines links for navigation.
progress - This tag exhibits the progress of a task.
ruby - It defines a ruby annotation for East Asian typography.
wbr - This tag defines a line-break.


What are the new Form elements made available in HTML5?

datalist - It specifies a list of options for input controls
output - It defines the result of a calculation.
keygen - This tag defines a key-pair generator field.


What is a Canvas? What is the default border size of a canvas?

Canvas is a rectangular area on a HTML page, specified with the canvas tag.
By default, It has no border. To get a border style attribute can be used.

What is SVG?

SVG is the abbreviation for Scalable Vector Graphics and is recommended by W3C.


What browsers and OS support HTML5?

All major browsers such as Chrome, Firefox, Internet Explorer support HTML5. All operating systems such as iOS and Android, Windows do support HTML5 as well.
It is used to define vector-based graphics for the Web


Differentiate between Canvas and SVG?

Canvas is resolution dependent while SVG is not.
Canvas does not provide any support for event handlers while SVG does provide the support for event handlers.
Canvas is suitable for graphic-intensive games while SVG is not suitable for gaming.
Canvas is suitable for small rendering areas while SVG is suitable for large rendering areas like Google maps.

Thursday, 6 August 2015

HTML5 Interview Questions and Answers 2015

HTML5 Interview Questions and Answers 2015,Top 20 HTML5 Interview Questions,HTML5 Interview Questions & Answers,HTML5 Interview Questions and Answers For Freshers and Experienced. HTML5 Frequently Asked Interview Questions,Freshers Latest HTML5 Technical Interview Questions & Answers,F2F Interview,HTML5, Interview Questions & Answers,What would be some common HTML5 interview questions,HTML5 interview questions and answers for 2 years,HTML5 Developer Interview Questions,10 Common face to face HTML5 interview questions and answers,HTML5 Interview Questions and Answers,Top 10 HTML5 Interview Questions and Answers 2015,HTML5 (CMS)Interview Question Answer,Technical HTML5 Interview Questions and Answers for getting Job,Where can I find good HTML5 interview questions,HTML5 job interview questions and answers for freshers,HTML5 interview questions and answers for experienced,10 Tough HTML5 Interview Questions With Smart Answers,HTML5 interview questions and answers for experienced,How to Answer HTML5 Interview Questions,Where can I find good HTML5 interview questions ,Download HTML5 Interview Questions.

Q 1- What is the difference between HTML and HTML5 ?

Ans: 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

Q 2- What is the <!DOCTYPE> ? Is it necessary to use in HTML5 ?

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

Q 3- How many New Markup Elements you know in HTML5

Ans: 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> For grouping a section of
stand-alone content, could be a video
<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.

Q 4- What are the New Media Elements in HTML5? is canvas element used in HTML5

Ans: 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
For embedded content, such as a plug-in
<track> For text tracks used in mediaplayers
we can use Canvas element in html5 like <canvas></canvas>

Q 5- Do you know New Input Type Attribute in HTML5

Ans: we can use below new input type Attribute in HTML5
Type Value
tel The input is of type telephone number
search The input field is a search field
url a URL
email One or more email addresses
datetime A date and/or time
date A date
month A month
week A week
time The input value is of type time
datetime-local A local date/time
number A number
range A number in a given range
color A hexadecimal color, like #82345c
placeholder Specifies a short hint that describes the expected value of an input field

Q 6- How to add video and audio in HTML5

Ans: The canvas element is used to draw graphics images on a web page by using javascript like below
Like below we can add video in html5
1. <video width=“320″ height=“240″ controls=“controls”>
2. <source src=“mysong.mp4″ type=“video/mp4″ />
3. <source src=“mysong.ogg” type=“video/ogg” />
4. </video>
And audio like this
1. <audio controls=“controls”>
2. <source src=“mysong.ogg” type=“audio/ogg” />
3. <source src=“mysong.mp3″ type=“audio/mpeg” />
4. </audio>

Q 7- What is the use of localStorage in HTML5?

Ans: 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
1. <script type=“text/javascript”>
2. localStorage.name=“PHPZAG”;
3. document.write(localStorage.name);
4. </script>
5. <script type=“text/javascript”>
6. localStorage.address=“Newyork USA”;
7. document.write(localStorage.address);
8. </script>

Q 8- What is the sessionStorage Object in html5 ? How to create and access?

Ans: The sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window. like below we can create and access a sessionStorage here we created “name” as session
1. <script type=“text/javascript”>
2. sessionStorage.name=“PHPZAG”;
3. document.write(sessionStorage.name);
4. </script>

Q 9- What the use of Canvas Element in HTML5?

Ans: The canvas element is used to draw graphics images on a web page by using javascript like below
1. <canvas id=“pcdsCanvas” width=“500″ height=“400″>
2. </canvas>
3. <script type=“text/javascript”>
4. var pcdsCanvas=document.getElementById(“phpzagCanvas”);
5. var pcdsText=pcdsCanvas.getContext(“2d”);
6. pcdsText.fillStyle=“#82345c”;
7. pcdsText.fillRect(0,0,150,75);
8. </script>

Q 10- What purpose does HTML5 serve?

Ans: HTML5 is the proposed next standard for HTML 4.01, XHTML 1.0 and DOM Level 2 HTML. It aims to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as Adobe Flash, Microsoft Silverlight, Apache Pivot, and Sun JavaFX.
Q 11- What is the difference between HTMl5 Application cache and regular HTML browser cache?
Ans: HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site’s performance, though you are of course using bandwidth to download those files initially.

Q 12- HOW DO YOU PLAY A AUDIO USING HTML5?

Ans:We can display audio using the tag as shown below:
1. <audio controls=“controls”>
2. <source src=“test.mp3″ type=“audio/mp3″ />
3. </audio>

Q 13- WHAT ARE THE DIFFERENT TYPES OF STORAGE IN HTML5?

Ans:HTML5 offers two new objects for storing data on the client:
LocalStorage – stores data with no time limit
1. <script type=“text/javascript”>
2. localStorage.lastname=“ZAG”;
3. document.write(localStorage.lastname);
4. </script>
SessionStorage – stores data for one session.The data is deleted when the user closes the browser window.
1. <script type=“text/javascript”>
2. sessionStorage.lastname=“ZAG”;
3. document.write(sessionStorage.lastname);
4. </script>

Q 14- HOW DO YOU PLAY A VIDEO USING HTML5?

Ans:We can display video using the tag as shown below:
1. <video width=“320″ height=“240″ controls=“controls”>
2. <source src=“test.mp4″ type=“video/mp4″ />
3. </video>

Q 15- WHAT ARE THE NEW APIS PROVIDED BY THE HTML 5 STANDARD? GIVE A BRIEF DESCRIPTION OF EACH?

Ans:The canvas element: Canvas consists of a drawable region defined in HTML code with height and width attributes. JavaScript code may access the area through a full set of drawing functions similar to other common 2D APIs, thus allowing for dynamically generated graphics. Some anticipated uses of the canvas include building graphs, animations, games, and image composition.
• Timed media playback
• Offline storage database
• Document editing
• Drag-and-drop
• Cross-document messaging
• Browser history management
• MIME type and protocol handler registration

Q 16- WHAT OTHER ADVANTAGES DOES HTML5 HAVE?

Ans:
a) Cleaner markup
b) Additional semantics of new elements like <header>, <nav>, and <time>
c) New form input types and attributes that will (and in Opera’s case, do) take the hassle out of scripting forms.

Q 17- GIVE AN EXAMPLE OF NEW ELEMENTS IN HTML5 TO SUPPORT MULTIMEDIA AND GRAPHICS?

Ans: HTML5 introduced many elements such as , instead of

Q 18- WHAT IS THE DIFFERENCE BETWEEN HTML5 APPLICATION CACHE AND REGULATE HTML BROWSER CACHE?

Ans:The new HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site’s performance, though you are of course using bandwidth to download those files initially.

Q 19- WHAT PURPOSE DOES HTML5 SERVE?

Ans:HTML5 is the proposed next standard for HTML 4.01, XHTML 1.0 and DOM Level 2 HTML. It aims to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as Adobe Flash, Microsoft Silver light, Apache Pivot, and Sun JavaFX.

Q 20-What is SVG and advantages of SVG?

SVG is a language for describing two-dimensional vector graphics in XML.

SVG stands for Scalable Vector Graphics
SVG is used to define vector-based graphics for the Web
SVG defines the graphics in XML format
SVG graphics do NOT lose any quality if they are zoomed or resized
Every element and every attribute in SVG files can be animated
SVG is a W3C recommendation

Code Example:

<?xml version=”1.0″ standalone=”no”?>
<!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.1//EN”
“http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&#8221;&gt;

<svg xmlns=”http://www.w3.org/2000/svg&#8221; version=”1.1″>
<circle cx=”100″ cy=”50″ r=”40″ stroke=”black”
stroke-width=”2″ fill=”red” />
</svg>

Advantages:

Advantages of using SVG over other image formats (like JPEG and GIF) are:

SVG images can be created and edited with any text editor
SVG images can be searched, indexed, scripted, and compressed
SVG images are scalable
SVG images can be printed with high quality at any resolution
SVG images are zoomable (and the image can be zoomed without degradation)