HTML Interview Questions and Answers

What is HTML?

HTML stands for hypertext mark-up language.

Hyper is the opposite of linear. Old-fashioned computer programs were necessarily linear - that is, they had a specific order. But with a hyper language such as HTML, the user can go anywhere on the web page at any time. Text is just what you're looking at now - English characters used to make up ordinary words. Mark-up is what is done to the text to change its appearance. For instance, marking up your text with <b> before it and </b> after it will put that text in bold. Language is just that. HTML is the language that computers read in order to understand web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language.

Why we Place all External CSS Files within the Head Tag?

Moving style sheets to the document HEAD makes pages appear to be loading faster. This is because putting style sheets in the HEAD allows the page to render progressively.

What is the simplest HTML page?

HTML Code:


<HEAD> <TITLE>Welcome! </TITLE> </HEAD>

<BODY> Hello world! </BODY>


What is a html tag?

HTML markup tags are usually called HTML tags.
HTML tags are keywords surrounded by angle brackets like <html>.
HTML tags normally come in pairs like <b> and </b>.
The first tag in a pair is the start tag, the second tag is the end tag,
Start and end tags are also called opening tags and closing tags

What is the file extension of html?

The HTML file extension is .htm or .html

What is a hypertext link and how to create it?

A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination.

The anchor element is used to define the start and/or destination of a hypertext link. A hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new document or a new section within the current document.

Example: The <a href=""> webiwip</a>

How can I include comments in HTML?

An HTML comment begins with <!-- , ends with --> .The following are examples of HTML comments: 

<!-- This is a comment. -->
<!-- This is another comment, 
and it continues onto a second line. -->

Can I nest tables within tables?

Yes, a table can be embedded inside a cell in another table. Here's a simple example:

<table  border='1'>
          <td>this is the first cell of the outer table</td>
            <td>this is the second cell of the outer table, with the inner table embedded in it
            <table  border='1'>
                        <td>this is the first cell of the inner table</td>
                        <td>this is the second cell of the inner table</td>
this is the first cell of the outer table this is the second cell of the outer table, with the inner table embedded in it
this is the first cell of the inner table this is the second cell of the inner table
What is html Meta element?

The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page. 
Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.
The <meta> tag always goes inside the head element.
The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.

What are HTML Lists and html code for list items?

HTML lists are ordered and unordered
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. 
The list items are marked with bullets (typically small black circles). 


An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. 
The list items are marked with numbers. 


A definition list is a list of items, with a description of each item. 
The <dl> tag defines a definition list.The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list): 

<dd>- black hot drink</dd>
<dd>- white cold drink</dd>
What is a html form?

HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. Example

<form action="./#" method="get" name="input">Username: <input name="user" type="text" /><br />
<input type="submit" value="Submit" /></form>
Can I have two or more actions in the same form?

No. A form must have exactly one action. However, the server-side program that processes your form submissions can perform any number of tasks.

What is a DOCTYPE?

According to HTML standards, each HTML document begins with a DOCTYPE declaration that specifies which version of HTML the document uses. Today, many browsers use the document's DOCTYPE declaration to determine whether to use a stricter, more standards-oriented layout mode.

What is the difference between the HTML form methods GET and POST?

As per functionality both GET and POST methods were same.

Difference is GET method will be showing the information information to the users. But in the case of POST method information will not be shown to the user.

GET method characters were restricted only to 256 characters. But in the case of POST method characters were not restricted.

GET method you can only use text as it sent as a string appended with the URL, but with POST is can text or binary.

GET is the default method for any form, if you need to use the POST method you have to change the value of the attribute method to be Post.

Why html page looks good on one browser, but not on another?

There are slight differences between browsers, such as Netscape Navigator and Microsoft Internet Explorer, in areas such as page margins. The only real answer is to use standard HTML tags whenever possible.

How can I display an image on my page?

Use an IMG element. The SRC attribute specifies the location of the image. The ALT attribute provides alternate text for those not loading images. For example: 

<img src='logo.gif' alt='ACME Products' />

Latest Updates


Choose appropriate article for the given sentence:
__________ teachers had ________ late lunch as their meeting lasted longer than___ hour.

Child Development & Pedagogy

Which of the following is the most effective way to create interest for learning in a student?

The rules of presenting the content to make them easy are called_________?

The term SLD in children’s mental health denotes for?

The child will be able to use proper sentences by the age of?

Indian Politics

______is an institutional mechanism to provide representation to the states of India?

Books and Authors

Which text is not written by Kalidasa?

Indian Constitution

Which Constitutional Amendment introduced Right to Education as a Fundamental Right?

Indian History

Which animal is engraved on Harappan seals?

Indian Politics

Who is known for initiating electoral reforms in India to ensure free and fair elections?

Indian Constitution

The sequence in which the given terms are mentioned in the preamble to the Constitution of India is?

Which of the following parts of the Constitution of India provides fundamental rights ?

Books and Authors

Who among the following is the author of ‘Politics’?

Which one is the text not written by Abul Fazl?

Which King was the author of Ratnawali, Nagananda, Priyadarsika?

Fill in the blank

Fill in the blanks with the most appropriate preposition in the given sentence.
The class begins _______ 7:30 am _____ the morning.

The workers were so skilled that their _____ was quite visible even to a layman.


Choose appropriate article for the given sentence:
______ German is ___ easy language to learn for English speaking students.

Latest Job Notifications

Banking Jobs

बैंकिंग कार्मिक चयन संस्थान Institute of Banking Personnel Selection(IBPS) - 7855 पद - 29/07/2022 अंतिम तिथि

SSC Recruitment

कर्मचारी चयन आयोग (एसएससी) Staff Selection Commission (SSC) - 1411 पद - 29/07/2022 अंतिम तिथि

Jobs in Rajasthan

राजस्थान अधीनस्थ और मंत्रिस्तरीय सेवा चयन बोर्ड Rajasthan Subordinate and Ministerial Services Selection Board (RSMSSB) - 5546 पद - 22-Jul-2022 अंतिम तिथि

Railway Recruitment

उत्तर मध्य रेलवे भर्ती प्रकोष्ठ Railway Recruitment Cell(NCR) - 1659 पद - 01/08/2022 अंतिम तिथि

Jobs in West Bengal

इंडियन पोस्ट सर्विस Indian Post Service - 2357 पद - 19/08/2021 अंतिम तिथि - पश्चिम बंगाल पोस्टल सर्कल

Banking Jobs

भारतीय स्टेट बैंक State Bank of India(SBI) - 6100 पद - 26/07/2021 अंतिम तिथि - CRPD/APPR/2021-22/10

SSC Recruitment

कर्मचारी चयन आयोग Staff Selection Commission(SSC) - 25271 पद - 31/08/2021 अंतिम तिथि

Jobs in Madhya Pradesh

राष्ट्रीय स्वास्थ्य मिशन मध्य प्रदेश National Health Mission MP(NRHM) - 5215 पद - 22/06/2021 अंतिम तिथि

Jobs in Punjab

पंजाब स्टेट पावर कॉर्पोरेशन लिमिटेड Punjab State Power Corporation Limited (PSPCL) - 2632 पद - 20/06/2021 अंतिम तिथि

Jobs in Chhattisgarh

स्वास्थ्य सेवा निदेशालय, छत्तीसगढ़ Department of Health & Family Welfare, Chhattisgarh - 267 पद - 26/06/2021 अंतिम तिथि