Q) What is HTML?

A) HTML stands for Hyper Text Markup Language. It is a standard text formatting language for creating web pages. It consists of a series of elements which tell the browser how to display the content

Q) Explain basic HTML document syntax

A) In general a basic HTML document consists of Header and Body tags inside html tags. Its not case sensitive. Below is the simple syntax of HTML document.

<!DOCTYPE html>
<title>Sample Title</title>

<h1> Sample Heading</h1>

<h3> Sample Sub Heading</h3>

Sample paragraph which has description or any other content


Q) What are tags and do all html tags have an end tag?(This is one of interviewers favorite question)

A) Html tags are usually composed of an opening tag, content and closing tag. And few html tags don’t have end tag.

Below is the example of html tags with and without end tag

<!--With end tag-->


<!--Without end tag-->


Q) What is an anchor tag or hyperlink in HTML?

A) The HTML provides an anchor tag which is used to create a hyperlink that links one to another page. Below is the syntax for hyper link

<a href="www.Inkfort.com"> This is a link inside anchor tag</a>

Q) Give a sample syntax to bind an image.

A) An image can be shown in a browser with img tag. The following is the example:

<img src="InkFortLogo.jpg" width="200" height="200">

Q) Explain list elements in HTML

A) There are basically 3 common lists:

  1. Ordered list:The ordered list displays elements in numbered format.
  2. Unordered list :The unordered list displays elements in bulleted format
  3. Definition list: The definition list displays elements in definition format like in dictionary.

Q) What are HTML headings?

A) HTML headings are defined as below

HTML headings are defined with <h1>,<h2>.. to <h6> tags
<h1> indicates the main and important heading with <h6> being least important or last sub heading before content.
The syntax is simple as follows:

<h1> This is main heading<h1>
<h2> This is also main heading but less than h1<h2>
<h6> This is sub heading with least size<h6>

Q) Explain Style Attribute

A) Html elements can be set with many styles using style attribute
Below is the syntax for applying style for any element

<tagname style="property:value;">

<h1 style="color:green;"> This is green heading</h1>
<p style="text-align:center;"> The text is aligned to show in center</p>

Q) What is HTML Formatting?

A) HTML uses element tags to provide various formatting to text. The result gives special type of text. Below are few examples for same:

<b> - for making text Bold
<i> - for making text italic
<strong> - for showing text as important
<sub> - for subscript text
<sup> - for superscript text

Q) What is CSS? Explain briefly(Every interviewer will ask basic questions on CSS if he is expecting you to work on UI)

A) CSS stands for Cascading style sheets. It is mainly to used to control themes, and to change layout of multiple web pages at once.

CSS can be used at 3 levels:

Inline: by using the style attributes at HTML element level

Internal: by using style attribute in part of HTML document

External: by using style attribute in external CSS file

Q) Explain table tag in HTML

A) To render a table in HTML with multiple rows and columns we can use
tag. It can be used with and
tags to generate row, data and header respectively. Below is simple table using tags.

	<th> EmpId </th>
	<th> EmpName </th>
	<th> EmpSalary </th>
	<td> 101 </td>
        <td> MAK </td>
        <td> 5000 </td>
        <td> 102 </td>
        <td> Fort </td>
        <td> 6000 </td>

Q) What is <form> element?

A) The HTML form element defines a form which is used to collect user input details. It contains different input elements like text box, combo box, radio buttons, check boxes and other controls.

Below are few syntaxes:
<input type="text" >
<input type="radio">

Q) What is select element?

A) select element is used to define a drop down list for input selection. Below is sample

<select name="Birds">
<option value="Peacock">Peacock</option>
<option value="Eagle">Eagle</option>
<option value="Parrot">Parrot</option>

Q) What is nested web page in HTML and how to create it?

A) A web page inside another web page is called nested web page. The HTML iframe tag is used to display nested web page.
Below is the example of iframe:

<h2> Iframes example </h2>       
<iframe src="https://www.inkfort.com/" height="300" width="300"></iframe>    

Q) What is the use of a span tag?

A) The span tag is used for adding color on text, adding background and Highlight any color