Top 10 HTML Interview Questions and Answers For Fresher

Today we will know about the top 10 HTML interview questions and their answers in this article for fresher student and fresher employee, which will prove useful for you in exams and interviews. We have made a list of such important questions of HTML which are mostly asked in interviews and exams.

Q 1:- What is HTML?

Hyper Text Markup Language (HTML) is a type of language used to create a web page. It is a standard language of the World Wide Web (WWW) through which web browsers are told how to display the content of our web page.

Q 2:- What is Extension of HTML File?

The extension of an HTML file can be .html or .htm.

Q 3:- What is Tag?

For formatting a content in HTML page, it is kept inside tags. The HTML tag uses two symbols, less than (<) and greater than (>). Also slash (/) symbol is used to close the tag. An example can be seen below:

<a>Experts Tool</a>
<b>Experts Tool</b>

Q 4:- Which tag is used for line break?

<br> tag is used for line break.

Q 5:- How many types of headings are there in HTML?

There are 6 types of heading tags in HTML from <h1> to <h6>.An example can be seen below:

<h1>Experts Tool</h1>
<h2>Experts Tool</h2>
<h3>Experts Tool</h3>
<h4>Experts Tool</h4>
<h5>Experts Tool</h5>
<h6>Experts Tool</h6>

Q 6:- What is HTML attribute?

The HTML attribute defines the property of an element. It is written inside the start tag of the element. An attribute consists of two things, attribute name and value. An element can have many different types of attributes. Below you can see an example of an <a> tag in the example where the href attribute is used.

<a href="http://www.expertstool.com">This is a link</a>

Q 7 :- What is HTML Element?

The HTML element represents a type of structure that consists of three things.

start tag

content

end tag

You can see an example of a paragraph element below:

<p>Experts tool is Tutorials and Tools Wensite.</p>

Q 8:- How is comment written in HTML?

The HTML comment starts with “<!–” and ends with “–>”.

Q 9:- What are Empty HTML elements?

An element that has no content, such as a <br> element.

Q 10:- What is DOCTYPE?

DOCTYPE tells the browser what type of HTML is being used in the opened web page, this tells the browser how to render that page. It is necessary to use the correct DOCTYPE otherwise your web page can be open in quirks mode.