HTML Interview Questions & Answers part 1

0
292

Q: – What do you understand about DOCTYPE in HTML?

DOCTYPE is stands for Document Type Declaration.In an HTML every HTML document is started with DOCTYPE declaration.It may be differ for different versions of HTML.DOCTYPE is used only bySGML tools like as HTML validator.
Example of Document Type Declaration in HTML 4 are,
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Q: – How you define index document?

Many times we have require index.htm / document because it is a standard for the host-server to look for the document and deploy it.Default document to be displayed in the web.

Q: – How you define SPAN in HTML?

We use SPAN by using <SPAN> tag in HTML.Syntax:<SPAN>…………</SPAN>Used to highlightthe any color text, for adding colored text, for adding background image to text. SPAN not a cause of line break. It delimits text and using them we can use style to the \'elemental\' region without any break in Text.

Example:
p>
<span style="color:#FF0000;">
In this page we use span.
</span>
</p>

Q: – How you define HTML Frames?

Using HTML Frames we can show more than one HTML document on the same browser.Where as each HTML document is called Frame.
We use Frames using <frameset> tag.It is used to divide windows into frames.
Using frame tag we put HTML document into the each frame.

Example:
<frameset cols="25%,75%">
<frame src="frame_first.htm?phpMyAdmin=

70ac9566533a2665b6597346aab7f985&phpMyAdmin=f43d4e0b88acea2d2a393515f6bf38f2">
<frame src="frame_second.htm?phpMyAdmin=

70ac9566533a2665b6597346aab7f985&phpMyAdmin=f43d4e0b88acea2d2a393515f6bf38f2">
</frameset>
25% and 75% specifies the width of the page.Above frame told that frame_first aquire the 25% area on the web browser and frame_second aquire the 75% area on the same same web browser.

Q: – How you use Form's Action Attribute and Submit Button in HTML?

Using Submit Button we can sends the form to the server and Action Attribute is specified that which file we send.

<form name="input" action="submit_form.php"

method="get"><input type="hidden" name="phpMyAdmin" value="f43d4e0b88acea2d2a393515f6bf38f2" /><input type="hidden" name="phpMyAdmin" value="70ac9566533a2665b6597346aab7f985" />

Formname:

<input type="text" name="Form">

<input type="submit" value="Submit">

</form>
When we click the sumbit button web page than the submit_form is send to the server.

Q: – Write some useful table tags that we use in HTML?

I have display the list of some tags that we used in HTML table.These tags are:
<table>  This is started tag of table.All other
table tags works inside this tag.
<th>     This is used to write header on table.
<tr>     This is used to create row on table.
<td>     This is used to create table cells.
<caption>This is specifies the table caption.
<colgroup>Specifies the group of columns in table.
<col>    Using then we can set the attribute value
for one or more columns in table.
<thead>  This is used to set table head.
<tbody>  This is used to set table body.
<tfoot>  This is used to set table border.

Q: – How to create tables in HTML?

We use <table> tag to create the table in HTML. After creating an table we use <tr> tag to create the rows.And use <td> to create data cell on each row.These cell can store images,text,tables,list etc.
Basic syntax to create an Table are given below:
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
<td>row 1, cell 3</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
<td>row 2, cell 3</td>
</tr>
</table>

Q: – What is a tag?

In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons — to change the appearance of text, to show a graphic, or to make a link to another page.

Submitted By:-Payal Gupta            Email-ID: – payalgupta1325@yahool.com

SHARE

LEAVE A REPLY