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:

<HTML>

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

<BODY> Hello world! </BODY>

</HTML>

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="http://www.webiwip.net/"> 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'>
      <tr>
          <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'>
                    <tr>
                        <td>this is the first cell of the inner table</td>
                        <td>this is the second cell of the inner table</td>
                    </tr>
            </table>
            </td>
        </tr>
</table>
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). 

<ul>
<li>Coffee</li>
<li>Milk</li>
</ul> 


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

<ol>
<li>Coffee</li>
<li>Milk</li>
</ol> 


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): 

<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl> 
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.

Latest Updates

Trigonometry

What is the value of cot 4π/3 ?

Indian Politics

Article-24 of the Indian Constitution ‘Prohibition of employment of children in factories, etc’ deals with?

Article-134A of the Indian Constitution ‘Certificate for appeal to the Supreme Court’ deals with?

Chemistry

Who invented Aspirin?

Physics

A larger force on a rotating body results in larger?

What is the unit of the physical quantity, magnetic flux density?

Algebra

The system of equations 2x + 4y = 6 and 4x + 8y = 8 is ?

Time and Distance

A thief is spotted by a policeman from a distacne of 100 m. When the policeman starts the chase, the thief also starts running. If the speed of the theif is 8 km / hour and that of the policeman is 10 km/hour, then how far will the theif have to run before he is overtaken?

Algebra

Aman and Alok attempted to solve a quadratic equation. Aman made a mistake in writing down the constant term and ended up in roots (4, 3). Alok made a mistake in writing down the coefficient of x to get roots (3, 2). The correct roots of the equation are?

Compound Interest

The effective annual rate of interest corresponding to a nominal rate of 22% per annum payable half-yearly is?

Volume and Surface Area

If the volume of a cylinder is 2156 cubic cm and height is 14 cm, find its radius?

Algebra

What is the equation of the line which passes through the points (2, 3) and (- 4, 1)?

Triangles

In △ABC, the angle bisector of ∠A cuts BC at E. Find length of AC, if lengths of AB, BE and EC are 9 cm, 3.6 cm and 2.4 cm?

In a triangle, the length of the opposite side of the angle which measures 45° is 8√2 cm, what is the length of the side opposite to the angle which measures 90°?

General Knowledge of India

The boundary line between India and Pakistan is called?

Which city is located on the banks of the river Mahanadi?

Indian History

When was the battle of Haldighati fought?

In 1498, which Portuguese explorer discovered a new sea route from Europe to India?

General Knowledge of India

Chapchar Kut is a festival of which State?

Chemistry

In chemistry, soap is a salt of a ?

Indian Economy

Which of the following is a Direct tax?

Biology

Sauria lacertidae is the scientific name of?

Which of the following is a primary function of haemoglobin?

Average

A factory buys 8 machines.3 Machine A, 2 Machine B and rest Machine C. Prices of the machines are 100000, 80000 and 45000 respectively.Calculate the average cost of these machines?

Discount

Ticket for an adult is 500 and a child is 200. 1 child goes free with two adults. If a group has 20 adults and 8 children what will be the discount the group get?