HTML5 Interview Questions and Answers : 10 commonly asked questions

I have listed 10 most commonly asked HTML5 interview questions and answers during Front end developer interview. Speaking of HTML5 used on mobile devices; get familiar yourself with Android 5.0 Lollipop features which is one of the hot topic these days!

HTML5 is becoming very important technology since Safari doesn’t support Flash by default. Users need to enable and install flash plugin into their browsers. Same way, Chrome OS and Chrome browser do not support Flash either.

That is why HTML5 is becoming more and more popular. HTML5 is compatible since supported by cross-browser platforms as well.

If you love Questions and Answers on this page; and if you are preparing for an interview, I’d strongly recommend reading HTML5 and CSS3 All-in-one For Dummies book by Andy Harris. I really liked this book and found very helpful preparing for interviews.

READ : HTML5 interview questions and answers for experienced developers

Related Article : CSS interview Questions and Answers : 15 commonly asked Questions

READ : Javascript interview Questions Answers : 10 Commonly asked Questions


(1) What is the use of Canvas Element in HTML5? 

HTML5 Canvas element can be used to draw graphics images on a web page by using javascript.

(2) Can you give an example of Canvas element how it can be used?

<canvas id=“DGTCanvas” width=“500″ height=“400″>
</canvas>
<script type=“text/javascript”>
var DGTCanvas=document.getElementById(“DGTCanvas”);
var DGTText=DGTCanvas.getContext(“2d”);
DGTText.fillStyle=“#82345c”;
DGTText.fillRect(0,0,150,75);
</script>

This book is far better than any other learning material. It has very basic information that includes both HTML5 and CSS3 with sample code and comprehensive examples.

(3) What is the purpose of HTML5 versus XHTML?

HTML5 is the next version of 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. Instead of using those plugins, it enables browser to serve elements such as video and audio without any additional requirements on the client machine.

Related article on DGlobalTech.com

(4) What is the difference between HTML and HTML5 ?

HTML5 is nothing more then upgraded version of HTML where in HTML5 supports the innovative features such as 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 elemenents.

(5) WHAT are some other advantages of HTML5?

a) Cleaner markup than earlier versions of HTML
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.

(6) What is the  <!DOCTYPE>? Is it mandatory to use in HTML5?

The <!DOCTYPE> is an instruction to the web browser about what version of HTML the page is written in. The <!DOCTYPE> tag does not have an end tag. 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).

(7) What are the New Media Elements in HTML5?

New Media Elements in HTML5 are :

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

(8) What is the major improvement with HTML5 in reference to Flash?

Flash is not supported by major mobile devices such as iPad, iPhone and universal android applications. Those mobile devices have lack of support for installing flash plugins. HTML5 is supported by all the devices, apps and browser including Apple and Android products. Compared to Flash, HTML5 is very secured and protected. That eliminates major concerns that we have seen with Flash.

(10) What is the sessionStorage Object in html5 ? How you can create and access that?

The HTML5 sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window. We can create and access a sessionStorage, created “name” as session

<script type=“text/javascript”>
sessionStorage.name=“DGTECH”;
document.write(sessionStorage.name);
</script>

Continue Reading on HTML5 Geolocation API

Thanks for reading and hope you like the post. If you have any comments, feedback or like compiled information, please encourage us by posting comments below.

READ : AJAX Interview Questions and Answers : 15 Commonly asked Questions

Recommended reading : CSS Interview Questions and Answers 

Recommended reading : Javascript interview Questions and Answers 

19 Comments

  1. This is very fascinating, You’re an overly professional blogger.

    I have joined your rss feed and look ahead to looking for extra
    of your great post. Also, I’ve shared your website in my social networks

  2. What Are Outsourced IT Services?
    Redistributed IT administrations are the point at which you employ an outside organization to deal
    with your IT needs. An outsider oversaw specialist organization (MSP) can cover everything from the security of systems and the
    usage of working frameworks to the establishment of programming and the reinforcement
    of documents.

    Note that re-appropriated IT administrations are not simply break/fix administrations.
    A break/fix specialist comes to you when something is broken, charging an hourly expense to
    analyze and fix the issue. A break/fix administration may appear
    to be more affordable since you possibly pay when you have
    an issue, yet it’s probably going to be all the more exorbitant over the long haul.

    They have next to zero motivator to work rapidly or cause a
    steady fix since they to get paid more in the event that it requires them a
    long investment or different excursions to fix something.

    In contrast to break/fix benefits, an oversaw IT specialist organization constructs an association with your organization, always checking your system for a month to month charge.
    MSPs are there to keep your system running easily, not simply to fix issues,
    so they have increasingly motivator to locate a quick, dependable arrangement if something goes off-base.

    It’s better for you and the specialist organization on the off
    chance that they kill dangers and fix issues as they occur.
    Taking care of an issue the first run through methods less work
    for them and urges you to proceed with your participation. https://www.lgnetworksinc.com/fractional-outsourcing-it-services/

  3. Anyone who says that Facebook, Twitter, My – Space, and stuff like that really are a ‘trend’ that can soon pass
    just isn’t steering you inside right direction. It is the difference in the number
    of traffic, that will ultimately determine the grade
    of performance in a very real business. The possibilities are endless for your
    budding businessperson aiming to enter retail sales.

  4. It is perfect time to make a few plans for the future and it’s time to be happy. I’ve learn this publish and if I may I desire to counsel you some interesting things or tips. Maybe you can write next articles relating to this article. I desire to learn more issues approximately it!

  5. I simply want to mention I am beginner to blogging and definitely liked this web-site. Very likely I’m likely to bookmark your website . You really have fantastic stories. Kudos for revealing your web site.

  6. I have been browsing online more than 2 hours today, yet I
    never found any interesting article like yours.
    It’s pretty worth enough for me. In my view, if all site
    owners and bloggers made good content as you did, the net will be much more useful than ever before.

  7. I will right away seize your rss as I can not in finding your email subscription hyperlink
    or newsletter service. Do you have any? Please permit
    me know so that I may just subscribe. Thanks.

Leave a Reply

Your email address will not be published.