Featured Post

What is the purpose of the php.ini file?

  The PHP configuration file,   php.ini , is the final and most immediate way to affect PHP's functionality. The php.ini file is read ea...

Showing posts with label HTML Interview Questions. Show all posts
Showing posts with label HTML Interview Questions. Show all posts

HTML Interview Questions And Answers

Ques: 1 What do you understand about DOCTYPE in HTML?

Ans: 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">

Ques: 2 How Cell Padding is differ from Cell Spacing?
Ans: I have given you how cell padding is differ from cell spacing given below:
Cell Padding: Cell Padding in HTML: is used to define the how much space need b/n cell content and cell edges.
Syntax:
< table width="200" border="1" cellpadding="3">
 means that it takes 3 pixels of padding inside the each cell.
Cell Spacing: It is also used to format the table.but it differ than cell padding because in cell padding we can set an extra space to seperate the cell content with cell edges.Where as we use cell spacing to set the space b/w the cells.
Syntax:
< table width="200" border="1" cellspacing="10">
 We can use cell padding and cell spacing together like that,
< table width="200" border="1" cellpadding="3" cellspacing =�10�> 

Ques: 3 How you define index document?
Ans: 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.
Ques: 4 How you define HEAD in HTML?
Ans: Head is placed before the body in the HTML.It is use to display only the general information or unordered collection to information about the HTML document.
Ans:head tag is the first tag in html. it helps to give title of the page.
Ques: 5 How you define SPAN in HTML?
Ans: 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>
 

Ques: 6 How you define body in HTML?
Ans: Body in HTML specifies the all contents of the document.Means that it contain the text,images, colors,graphics etc.
Ques: 7 How you display an picture in background of HTML?
Ans: We can display an picture in background of HTML page using that code.
Syntax:
<body style="background-image:url(image path)">
Ques: 8 What is Semantic in HTML?
Ans: I have given two reasons of use Semantic HTML.
1.Always avoid the use of markup that present you HTML document.Like: element, attribute etc.
2.Try to use available markup to differentiate the meanings of phrases and structure in the document.
Example:
<cite class="booktitle">The Grapes of Wrath</cite>
 Above,the <cite> element is used because it most closely matches the meaning of this phrase in the text.
Ques: 9 How to differ width=�200� and width=�200%�?
Ans: There are many differences b/w width="200" and width="200%".I have given you main difference.If you want create a table set width="200".Means that width of table is 200 which is fixed.But When we write width="200%" then 200% table will display in its full view and can changed according the resolution and browser.
Example: Where, I use both width="200" and width="200%".
<html>
<head>
<title>Shows the difference of width="200" and width="200%"</title>
</head>
<body>
<table width="200%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td>width=&quot;200%&quot;</td>
  </tr>
</table>
<br />
<table width="200" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td>width=&quot;200&quot;</td>
  </tr>
</table>
</body>
</html>
 

Ques: 10 How to blink text in IE6?
Ans: Content that we write b/w the <blink> tag will blink on HTML page.
Syntax:
<blink>text want to blink</blink>
Ques: 11 How you use scipts on HTML?
Ans: We use scripts on HTML page for making HTML page Dynamic.
 TO use scripts on HTML page we use <script> tag.
Example:
<html>
<head>
</head>
<body>
<script type="text/javascript">
document.write("R4R Welcomes You!")
</script>
</body>
</html>
output:
R4R Welcomes You!

Ques: 12 How you define HTML Frames?
Ans: 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.
 
Ques: 13 How you use Form's Action Attribute and Submit Button in HTML?
Ans: 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. 

Popular Posts