HTML5 Interview Questions and Answers

Last updated on Feb 08, 2024
  • Share
HTML5 Interview Questions

In the past years, the adoption of HTML5 has increased in an emerging way that more and more companies are using it to deliver rich cross-platform web applications. In this article, we have tried to cover all HTML5 Interview Questions and Answers which are for both basic and advanced levels. Now the question that would come to your mind is- what is HTML5? To develop any web application mainly three components are required i.e. HTML, CSS, and Javascript where HTML is mainly used for designing the website.HTML5 is the latest version which supports all kinds of existing web pages. Every web page you visit today on the internet is written with one or another version of HTML code. HTML5 is one of the highest-paying web technologies so everyone needs to learn basic concepts about this markup language. Companies like Facebook, Amazon, Google, and Youtube have been shifted to HTML5 from Adobe’s Flash for better development. For many years, millions of developers were using this technology but since 2015 it is the most reliable and universal choice to develop web applications. To help you with the same, we have created this article which would clear all your concepts regarding HTML5.

Quick Facts About HTML5
What is HTML5? It is a MARKUP language that is mainly used for creating interfaces rather than analytical works or logical.
What is the latest version of HTML5? HTML5.2 released on December 2017
Who developed HTML5? WHATWG
When was HTML5 first released? 28 October 2014

Most Frequently Asked HTML5 Interview Questions

Here in this article, we will be listing frequently asked HTML5 Interview Questions and Answers with the belief that they will be helpful for you to gain higher marks. Also, to let you know that this article has been written under the guidance of industry professionals and covered all the current competencies.

Q31. What is a list tag and mention the most commonly used list tags?

HTML5 users implement list tags to list out the required information. The most commonly used list tags are mentioned below for your acknowledgment.

Definition List: This list tag offers a list in it and takes Definition Term (<dt>...</dt>) and a detailed definition (<dd>...</dd>).

1. Ordered List: This list tag provides the required list by the user in a numbered format.


2. Unordered List: This one offers the user required a list in a bullet format.


Both the ordered and unordered list item tags use the list item tags (<ul>...</ul>) in them.

Q32. How do we declare a custom attribute in HTML?

Custom attributes are one of the most important new features in HTML5. They play an integral role in semantic development. Custom attributes are designed to store custom data private to web pages or applications for which there are no other attributes. Because custom attributes are valid in HTML5, they get used in all browsers that support HTML5 doctypes.

All attributes in HTML5 on an element starts with "data-" like data-type="best", data-distance="4km", data-identifier="".

Q33. How many ways to use colors apply on html elements?

We can color HTML elements in three different ways, as mentioned below.

  • #efefef or Hex Color
  • By using the color name such as blue, red, etc.
  • RGB(10,234,128). This is a combination of red, green, and blue.
Q34. Describe the usage of <footer>, <article>, <section>, and <header> HTML5 semantic elements.

<footer>: This semantic element is used to contain information that should appear at the very end of the content section. It also contains additional information of the section such as copyright information, Author's name, and related links.

<article>: This one contains a self-contained composition which can logically be recreated by developers outside of the page without losing its primary meaning. For example news stories and blog posts.

<section> : This HTML5 semantic element holds content that shares a common informational purpose or theme.

<header>: Developers use this to contain navigational and introductory information about a section of the page, such as section heading, publication date and time, author’s name, content table, etc.

Q35. What is Web SQL Database in Html 5?

Web SQL is not a part of HTML5. It is a separate specification that helps in developing web apps. Web SQL is used to manage the client-side database because it stores data on the client side, not on the server side. A Web SQL database works only in latest versions of Google Chrome, Safari, and Opera browsers.

Q36. What is <iframe> and why we can use this?

The <iframe> tag is used to indicate an inline frame, or, a browsing context that is nested. It allows outside documents to be inserted in the main HTML document seamlessly. Inline frames are mostly used in online advertising, where the contents of the iframe can e an ad from a third party.

Q37. What is w3c and Whatwg?

The World Wide Web Consortium (W3C) is a community of developers working towards setting global standards for development.

WHATWG is short for Web Hypertext Application Technology Working Group. It was created during a W3C workshop session by working individuals of Apple, Mozilla and Opera Software in 2004. WHATWG is a community of developers focused more on HTML rather than XHTML and working on standards to improve on user needs.

Q38. What are the various formatting tags in HTML5?

Formatting tags are used in HTML 5 to display different styles of text. Here are the formatting tags in HTML 5:

  • <b> - Used to bold text
  • <strong> - Use to mark text as Important
  • <i> - Used to write in Italics
  • <em> - Used to emphasize text
  • <mark> - Used to mark text
  • <small> - Used to make the text small
  • <del> - Used to Delete text
  • <ins> - Used to Insert text
  • <sub> - Used to make a subscript text.
  • <sup> - Used to make a superscript text
Q39. How many tags were removed in HTML5?
  • <frame>
  • <basefront>
  • <applet>
  • <frameset>
  • <big>
  • <center>
  • <bigcenter>
  • <noframes>
  • <dir>
  • <tt>
  • <acronym>
  • <basefont>
Q40. What is a manifest file in HTML?

In HTML 5, the manifest file is a normal text file used for listing resources in the browser which are to be cached for offline access. It also helps in loading resources faster and reducing server load time.

Today HTML is considered as the base for all web applications, but with each passing version, many new elements and features have been added to it. So, there is a high chance that the interviewer may ask about the currently used features but as it all starts with HTML so one must learn both. To summarize-

  • Should know the difference between versions of HTML especially HTML4 and HTML5
  • When writing code, always close your HTML tags.
  • Remember HTML is a Markup language, not a programming language.
  • Work with the lists and be more familiar with HTML tables.

Features of HTML5

  • Editing content within element and "required" form attribute
  • Figure tag and SVG element
  • Web fonts
  • Transition and Animation
  • Web Icons
  • Easily implemented audio, video, map with these tags
Reviewed and verified by Umesh Singh
Umesh Singh

My name is Umesh Singh having 11+ experience in Node.JS, React JS, Angular JS, Next JS, PHP, Laravel, WordPress, MySQL, Oracle, JavaScript, HTML and CSS etc. I have worked on around 30+ projects. I lo...