HTML Interview Questions

HTML is a widely used language that gives our webpage a structure. HTML stands for HYPERTEXT MARKUP LANGUAGE. HTML was created by Berners Lee in 1991.

Read Best Html Interview Questions and answers

#1 How do you add a copyright symbol on a HTML page?

Copyright symbol can be either copied and pasted from other sources. Or, you can also add it by writing a small piece of code: © or & #169; in the required page

#2 What is a physical tag and logical tag in HTML?

A Physical tag has physical text which is used to tell the browser how to display the text enclosed in the physical tag.

Example for the physical tags are: <big>, <b>, <i>

Logical tags are used to tell the meaning of the enclosed text in it. The example of the logical tag is <Important>….</Important> tag. When we enclose text in Important tag then it tell the browser that enclosed text is more important than other text.

#3 What is a Fieldset?

The <fieldset> is a tag in HTML that is used to group related elements in a form. It draws a box around the related elements.

#4 What is the purpose of using alternative texts in images?

The basic purpose of using alternative texts is to define what the image is about. During an image mapping, it can be confusing and difficult to understand what hotspots correspond to a particular link. These alternative texts come in action here and put a description at each link which makes it easy for users to understand the hotspot links easily.

#5 What is grouping in HTML?

Grouping is used to group several HTML controls like input, textarea, selects as well as labels ( <label>) within a web form. In HTML <fieldset> element is used for Grouping.

#6 What is HTML and what is it used for?

HTML is a widely used language that gives our webpage a structure. HTML stands for HYPERTEXT MARKUP LANGUAGE. HTML was created by Berners lee in 1991. A markup language is a set of markups tags. Every webpage is created in HTML. HTML documents are described in HTML tags.

#7 Is there advantages of collapsing white spaces in HTML?

Yes, Collapsing white spaces is one good way of writing HTML codes in an organized way. White spaces act similar to a single-spaced character and occupy the same size as rest of the characters. By collapsing multiple white spaces, we can indent lines of text and make the code more readable.

#8 What is the basic structure of an HTML document?

#9 How to create mailto link in HTML

Basically, when we usually start with a hyperlink that is Mailto rather than using HTTP or others, the browser should be able to compose an email in the visitor’s default email program on their computer. There are two ways to insert a mailto link into a HubSpot page or email, just by inserting a hyperlink into the rich editor or inputting into the source code. Option one is basically nothing just to insert a mailto link as a hyperlink, also highlight the text or click on the image as you wish.to apply on the mailto link to for your contacts or visitors to click on and finally click Add the link to finish. Option two is to Insert a mailto link into the source code and Click Save to finish then Publish or Update your page.
Example:
<a href="mailto:someone@example.com?Subject=Hello%20again" target="_top">Send Mail</a>

#10 What is the HTML tags?

People always confuse in understanding terms elements and tags. It must be noted that HTML documents contain tags, but do not contain the elements.It is a wide misconception that usually occurs in mind that both exist in HTML documents.elements are usually only generated after parsing step from these tags.

#11 What is a nest in HTML?

If you go and have a look at HTML markup for any webpage today, you will let to know that HTML elements are contained within other HTML elements. These elements which are inside of other are known as nested elements and they had become the essential part of building any web page nowadays. The most expertise way to know more about nesting is just to think about HTML tags in the form of boxes that hold your content which can be in form of text, images,etc.HTML tags are basically the boxes around the content.

#12 What isCell Spacing and Cell Padding?

Cell Spacing is referred to space/gap between the two cells of the same table.
Cell Padding is referred to the gap/space between the content of the cell and cell wall or Cell border.

Example:


<table border cellspacing=3>
<table border cellpadding=3>
<table border cellspacing=3 cellpadding=3>

#13 How many types of lists are available in HTML?

In HTML, we have two types of lists unordered lists and ordered lists. Unordered list starts with <ul> tag and ends with </ul> tag. Ordered tag starts with <ol> and ends with </ol>. Each list item is written as <li></li>

#14 What is an empty tag?

#15 What is HTML DOM?

Ask a Question