HTML

HTML Interview Questions & Answers Collection

Here, you can find HTML Interview Questions & Answers related to HTML basic tags, images, links, table, forms and other elements. These popular & frequently asked interview questions are listed under different categories.

Tutorials Class covers Interview Questions for Freshers as well as experienced professionals.

What is the full form of HTML?

HTML stands for Hyper Text Markup Language. It is used to create and format Web documents.


How to add Comments in HTML?

Comment tags <!-- and --> are used to insert comments in HTML.


How do you create links to sections within the same page?

Internal links make it easy for your users to jump to different parts of your page.
Destination Anchors: <a name="top"></a> Source Anchors: <a href="#top">Top </a>


Do all HTML tags require both a begin and end tag?

No, some tags do not come in pair.

For an example: <img> tag and <br> tag do not require end tags.


How to Add the Copyright Symbol to Web Page?

To insert the copyright symbol, use &copy; or &#169; in an HTML file.


What is !DOCTYPE in HTML?

A document type declaration, or DOCTYPE, is an instruction to the web browser about the particular version of HTML.

In HTML5 you can simple type following line for document type declaration:

<!DOCTYPE html> in an HTML file.


Will HTML 5 works without !DOCTYPE ?

No, browser will not be able to identify that it’s a HTML document and HTML 5 tags will not function properly.


How is the page structure of HTML 5 different from Previous HTML Versions?

A typical web page structure is made-up of headers, footers, navigation, central area and side bars. Before HTML 5 we defines them using DIV Tags with different classes/ids. HTML5 offers new elements for better document structure.

New Semantic/Structural Elements:

<header>: Represents header data of HTML.
<footer>: Footer section of the page.
<nav>: Navigation elements in the page.
<article>: Self-contained content.
<section>: Used inside article to define sections or group content in to sections.
<aside>: Represent side bar contents of a page.


What are the different new form element types in HTML 5?

  • color
  • date
  • datetime
  • datetime-local
  • email
  • month
  • number
  • range
  • search
  • tel
  • time
  • url
  • week

What are the New multimedia elements in HTML 5?

New multimedia elements: <audio> and <video>.

The HTML5 <audio> element is used to embed audio in a web page.

Similarly, we can use <video> tag to embed video.