2. HTML Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
HTML Basics
1. What does HTML stand for?
Ans: Hyper Text Markup Language
2. What does vlink mean?
Ans: visited link
3. What tag is used to add columns to tables?
Ans: <td>
4. What is the REFRESH meta tag used for?
Ans: Redirect to a new domain
5. Choose the correct HTML tag to make a text italic
(a) <italic>
(b) <i>
(c) <it>
(d) <ia>
Correct Ans: b
6. Choose the correct HTML tag to make a text bold
(a) <bold>
(b) <b>
(c) <bo>
(d) <ba>
Correct Ans: b
7. How can you make a list that lists the items with numbers?
Ans: <ol>
8. HTML code for adding a background color?
Ans: <body style="background-color:white">
9. Which tags we can use to add rows to your tables?
Ans: <tr> and </tr>
10. Choose the correct HTML to left-align the content inside a table cell
Ans: <td align="left">
3. HTML Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
11. What is the correct HTML tag for inserting a line break?
Ans: <br />
12. What tag tells the browser where the page starts and stops?
Ans: <html>
13. What tag adds a paragraph break after the text?
Ans: <P>
14. Which property will open a page in a new window?
Ans: target="_blank"
15. Which will let text wrap down the side of the image?
Ans: <img src="myImage.gif" align="right">
16. What character is used to indicate an end tag?
Ans: /
17. What beginning tag do I use if i want to center a particular word?
Ans: <center>
18. What is the range of heading tags available using HTML?
Ans: <h1> to <h6>
19. What type of file do you have to use when you are saving a new page?
Ans: All Files (*.*)
20. How can you create an e-mail link?
Ans: <a href="mailto:xxx@yyy">
21. An HTML file written in notepad can be saved with an extension?
(a).htm
(b).html
(c)Any of the above
(d)None of the above.
Ans: c
4. HTML Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
22. Which of the following is true about links by default?
(a) An unvisited link is underlined and blue.
(b)A visited link is underlined and red.
(c)An active link is underlined and purple.
(d)All the above.
Ans: a
23.The href attribute in the link tag specifies the?
(a) Destination of a link.
(b)Link.
(c)Hypertext
(d)None of the above
Ans: a
24. HTML Event Attributes onload fires just before the page is finishing loading?
(a)True
(b)False
Ans: b
25. HTML Event Attributes onunload fires
(a)when the browser window has been closed
(b)when the browser window is minimized
(c)when the browser window has changed focus to other window.
(d)After the page is finished loading
Ans: a
26. HTML Form Events ___________, fires the moment that the element loses focus.
(a)onblur
(b)onfocus
(c)onchange
(d)onlostfocus
Ans: a
5. HTML Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
27. Which of the following tags below are used for a multi-line text input control?
(a)textml tag
(b)text tag
(c)textarea tag
(d)Both b and c above
Ans: c
28. What is cell padding?
(a) Used to separate cell walls from their contents.
(b)Used to set space between cells
(c)Both a and b above
(d)Used to provide width to a cell
Ans: a
29. What are meta tags used for?
(a)To store information usually relevant to browsers and search engines.
(b)To only store information usually relevant to browsers
(c)To only store information about search engines.
(d)To store information about external links
Ans: a
30.When you use a heading tag in a document, what does the Web browser assume?
(a) Heading information is to appear in bold letters
(b)Heading information is to appear on its own line
(c)Heading information has a hyperlink
(d)Heading information is shown as a size six
Ans: d
6. HTML Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
31.What is the difference between XML and HTML?
(a)HTML is used for exchanging data, XML is not.
(b)XML is used for exchanging data, HTML is not.
(c)HTML can have user defined tags, XML cannot.
Ans: b
32.What is mean by DTD?
(a)Document type data
(b)Data type definition
(c)Document type definition
(d)Definition type document
Ans: d
33.DOM stands for
(a)Document object model
(b)Data object model
(c)Document Oriented model
(d)Data oriented model
Ans: a
34.Text/Html is called the __________ of the page
(a)content type
(b)MIME type
(c)content type/MIME type
(d)none of these
Ans: c
7. HTML Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
35.Which HTML attribute is used to define inline styles?
(a)font
(b)class
(c)styles
(d)style
Ans: d
36. Which is the correct CSS syntax?
(a) body:color=black
(b){body;color:black}
(c){body:color=black(body}
(d)body {color: black}
Ans: d
37. What does an HTML tag do?
(a)It specifies formatting and layout instructions for your web page.
(b)It hides programming instructions from view.
(c)It determines the organizational structure of your Web site.
(d)It connects your web site to an operating environment.
Ans: a
38. When you use a heading tag in a document, what does the Web browser assumes?
(a) Heading information is to appear in bold letters
(b)Heading information is to appear on its own line
(c)Heading information has a hyperlink
(d)Heading information is shown as a size six
Ans: b
39. What is meant by the cellspacing attribute?
(a)It makes the cell span more than one column
(b)It specifies the space between the cell wall and the contents of the cell.
(c)It specifies the space between two cells.
(d)It makes the cell span more than one row
Ans: c
8. HTML Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
40. Which of the following attributes comes in handy when borders have to be put between
groups of columns instead of every column?
(a)col
(b)colgroup
(c)rowspan
(d)row
Ans: b
41. A few lines in an HTML paragraph are to be formatted differently from the rest of the lines.
Which tag will assist in this?
(a)div
(b)p
(c)span
(d)format
Ans: b
42. Do all HTML tags come in pair?
Ans: No, not all HTMLS tags come in pair. For e.g. <img>, <br>
43. What is the advantage of collapsing white space?
Ans: The browser collapses the multiple white spaces into a single white space in HTML.This
allows the developers to arrange the HTML code in a well organized and legible format.
44. Is it possible to list elements straight in an html file?
Ans: Yes, it is possible with the use of indents.
45. Does a hyperlink apply only to text?
Ans: No. The hyperlinks can be applied to both text as well as the images.It means that even
the images can become clickable links with a capability to take the visitor to the next
page.This can be done simply by using <a href> tag.
9. HTML Interview Questions and Answers
Website: http://www.ITeLearn.com
Email: learn@itelearn.com
Contact: +1-314-827-5272, +91-837-4323-742(India)
46. What hierarchy is being followed when in style sheets?
Ans: Inline style takes priority over embedded style sheets. Embedded style take priority over
external style sheets. If a single selector includes three different style definitions, the
definition that is closest to the actual tag gets the priority.
47. What happens if the list-style-type property is used on a non-list element like a paragraph?
Ans: Here the property will be ignored without having any effect on the paragraph.
48. What is the advantage of using frames?
Ans: Frames make it easier to navigate through a site. The links that appear in the frame can
appear throughout the site.
49. How can I hide my source?
Ans: No. you can’t hide your source as it is required by the browser to display your
document.
50. What is a <dl> tag in HTML?
Ans: <dl> is a definition list tag used in HTML. It is used with <dt> and <dd>. <dt> list the item
while <dd> describes it.