Top 25 HTML Interview Questions and Answers for Experienced (PDF Free Download)

Are you looking for a job for a web designer and looking for Top HTML Interview Questions?

If yes, you are at the perfect spot for getting good HTML Interview Questions and topics that can help you to get your dream job. These questions and answers are handpicked for freshers as well as experienced.

HTML Interview Questions and Answers

HTML interview questions and answers are entirely based on core concepts of HTML and related topics.

What is HTML?

HTML is the short form of Hypertext Markup Language. HTML is used to design and display pages on the web. It makes the text content more attractive and dynamic. We can create tables, add images, videos, links in our text. We can also add animation to our page to make it more attractive. Every HTML page starts with <html> tag and end with </html> tag. It has two main parts head section and body section.

Read Also: Top 25 Web Designing Interview Questions and Answers for Experienced

Which HTML tags don’t have an end tag?

There are some HTML tags that don’t have closing tag like <br>, <hr>, <input> and <image> tag.

What do you mean by HTML tags?

Html tags have the following format:

An opening tag – content – closing tag

Some tags don’t have a closing tag. HTML tags are main part of HTML. We can create HTML documents and render their properties with HTML tags and properties may differ for different tags.


<tag> Text content </tag>

Explain different heading types?

There are six different heading types defined with <h1> to <h6> tags. Each heading tag displays the content with different size. <h1> tag is the largest heading tag and <h6> is the smallest heading tag.


<h1>Title 1</h1>
<h2>Title 2</h2>
<h3>Title 3</h3>
<h4>Title 4</h4>
<h5>Title 5</h5>
<h6>Title 6</h6>

How to differentiate HTML elements and HTML tags?

When we form HTML tag HTML elements are enclosed by brackets <> . HTML elements are used to communicate with a browser and to render text. Most of HTML tags are in pairs, and they cover the text.

Describe semantic HTML?

It is coding style that we can use to reinforce the meaning of the content. For example In semantic HTML we use <strong> </strong> tag for bold statement as well as <em> </em> tag for italic statement insted of using <b> </b> and <i></i> tags.

Explain an image map.

We can link many different web pages using a single image in the Image map. We can also define shapes in images that you want to take part in an image mapping. It is represented by <map> tag.

How to create a nested webpage in HTML?

We can use the iframe tag to represent a webpage within a webpage. It defines an inline frame on the HTML page.


<figure><iframe src="URL of page"></iframe></figure>

Here in src, we write the URL of the page which we want to use as a subpage.


        <h2>HTML Iframe example</h2>
        <p> We can use the height and width attributes to specify the size of the iframe:</p>
        <iframe src="" height="300" width="400"></iframe>

How to insert a copyright symbol on a browser page?

You can insert a copyright symbol by using &#169; or &copy; in an HTML file.

A hyperlink only applies to text, if no, then why?

No, you can apply hyperlinks on text and images both. The HTML <a> tag defines a hyperlink that links one page to another page. We must use the “href” attribute in <a> tag to generate a hyperlink.

How to keep list elements straight in an HTML file?

You can use indents to keep the list elements straight in the HTML file.

Explain the style sheet in brief.

A style sheet is used to build transportable, a consistent and well-designed style template. We can use these templates on several different web pages. It explains the formatting of a document written in HTML language.

How do we create a multi-colored text on a web page?

We can create a multicolor text on a web page by using <font color =”color”> </font> for the specific texts.

Can we change the color of the bullet?

The color of the bullet is the color of the first text of the list. So, whenever we want want to change the color of the bullet, we must change the color of the text.

What is a marquee tag?

Marquee tag is used to put the scrolling text on a web page. We can scroll the image or text to up, down, left or right automatically. We should put the text within the <marquee></marquee> tag, which you want to scroll.

Explain different methods used to separate a section of texts.

Three tags are used to separate a section of texts.

  • <br> tag – This tag is used to separate the line of text. It breaks the current line and brings the flow to the next line.
  • <p> tag – This tag contains the text in the form of a paragraph
  • <blockquote> tag – This tag is used to define a large quoted section. Whenever we want to display large quotation, then we should put the entire text within <blockquote> </blockquote> tag.

How to set an image as a background image of a web page?

We can use the following method to put the picture as a background image of a web page. We should put this code after </head> tag.

<body background = “errorsea.gif”>

Here, we can replace the “errorsea.gif” with the name of an image file which we want to display on your web page as a background image.

Describe the use of a span tag with an example.

We can use the span tag for the following things:

  1. Highlight any color of the text
  2. For adding background on specific text
  3. For adding color on specific text


<span style="color:#0f0f0f;">  
On this text we have used span tag.

What is the use of the canvas element in HTML5?

The <canvas> tag is used as a container to draw graphics on the web page using a scripting language like JS. We can perform rendering of 2D shapes and bitmap images using canvas tag. There are numbers of methods in canvas to draw boxes, paths, circles, add texts and images.


<canvas id="c1" width="400" height="200" style="border:1px solid #000;"></canvas>

What is SVG tag?

HTML SVG tag is used to describe the 2D vector and vector graphics. We should define SVG images and their behaviors in XML text files. As an XML file, we can also edit an SVG image with the text editor. SVG tag is mostly used for vector diagrams like pie charts, 2D graphs in an X, Y coordinate system.


<svg width="150" height="150">
    <circle cx="80" cy="80" r="40" stroke="yellow" stroke-width="5" fill="yellow" >    

Which video format is supported in HTML5?

HTML5 supports the following three types of video format.

  1. mp4
  2. WebM
  3. Ogg

Which audio tag is supported in HTML 5?

HTML5 supports the following three types of audio format.

  1. mp3
  2. WAV
  3. Ogg


<audio controls>
    <source type="audio/mpeg" src="love-me-like-you-do.mp3">

What is the button tag in HTML5?

We can use the button tag to create a button within the HTML page or forms on the web page. We can use the button as a “submit” or “reset” or “cancel” button.

Following code is used to create a button:

<button name="button" type="button" value="1"> Submit </button>

How to use figure tags in HTML 5?

We can use the figure tag to add a picture in a specific document on the web page. It is also used to handle the group of diagrams, photos, and code listing with some embedded content.


<p>Errorsea is the best platform for improving your coding skills and gettin solution of your problems."</p>
    <img src="images/errorsea.jpg" alt="Error Sea"/>

What is the use of datalist tag?

The HTML5 datalist tag facilitates users to choose the predefined options to the users to select data.


<label>Enter your Name: Select any member</label>
<input type="text" id="MainTeam" list="Errorsea_Team">
<datalist id="Errorsea_Team">
    <option value="Nick">
    <option value="Monil">
    <option value="Yash">

Read Also: Top 25 CSS Interview Questions and Answers

TOP 5 HTML Interview Questions

Embed Link:


This is all about HTML interview questions with complete answers. I am sure it will help you in cracking the web designer interview as an experienced or a fresher, and it will increase your confidence, too.

I hope you found this post fully informative and helpful.

Thank you for reading 🙂

Leave a Reply

Your email address will not be published.