HTML5 Interview Questions and Answers

Here WebtechLearning sharing a list of HTML5 Interview Questions answers. 2016.
Question: What is XHTML?
XHTML is an HTML that follows the XML rules.
Question: Why Recommended external CSS or Javascript versus inline?
1. Hard to maintain the Inline JS/CSS.
2. Inline js/css load slower.
3. No caching benefits in Inline JS/CSS.

Question: Why do we need to use W3C standard code?
W3C standards are to ensure cross-platform compatibility and more compact file sizes.
Question: What is lazy loading?
Lazy loading is a design pattern commonly used in computer field.
Lazy loading is loading code only once user needs it.
Question: What is the difference between HTML elements and tags?
HTML elements communicate to the browser how to render text.
Aftr that they are surrounded by angular brackets <> they form HTML tags.
Question: What does DOCTYPE mean?
DOCTYPE tells the browser which type of HTML is used in current webpage.
Question: Tell the name of few new tags in HTML5?
datalist, datetime, output, keygen, date, month, week, time, number, range, email, and url.
Question: What is the purpose of the z-index and how is it used?
The z-index helps specify the positioned elements that may overlap one another.
z-index can take following values.
Auto: Sets the order equal to its parents.
Number: Set Orders the Number specified.
Initial: Sets this property to its default value which is zero.
Inherit: Inherits from parent element.
Question: List the main CSS style sheet properties?

  • Background
  • Text
  • Font
  • List
  • Outline
  • Margin
  • Border
  • Padding
  • Table

Question: What are some of the new features and properties in CSS3? Box model

  • New Web fonts
  • Rounded corners
  • Box Shadows,
  • Transform property
  • Border Images
  • Text Shadows
  • New Color schemes
  • Multi-column layout
  • New Pseudo-classes
  • New Gradients

Question: What is file extension of HTML5?
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.
Question: 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.
Question: What are the new Form elements made available in HTML5?
datalist – It specifies a list of options for input controls
keygen – This tag defines a key-pair generator field.
output – It defines the result of a calculation.
Question: What are the various tags provided for better structuring in HTML5?
article – This tag defines an article.
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.
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.
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.
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.
wbr – This tag defines a line-break.
Question: What is SVG?
SVG is the abbreviation for Scalable Vector Graphics and is recommended by W3C.
It is used to define vector-based graphics for the Web
Question: 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.
Question: 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.
Question: HTML 5 provides drag and drop facility. How do you make an image draggable?

<img draggable="true" />

Question: What is HTML5 Web Storage?
It store the data locally in the user’s browser
Question: Differentiate between session Storage and local Storage objects?
Session Storage object stores the data only for one session while local Storage object stores the data without an expiry date.
Question: What is a Manifest file?
A Manifest file is a simple text file that tells the browser what to cache and what not to cache.
Question: What is a Web Worker?
A web worker is a JavaScript which runs in the background.
Question: 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. Its aim to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as Adobe Flash, Microsoft Silverlight etc.
Question: WHAT are some other advantages of HTML5?
Cleaner markup than earlier versions of HTML
Additional semantics of new elements like header, nav, and time
Question: 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.

WhatsApp chat