Your Ad Here

Saturday, January 3, 2009

Recent HTML Interview Questions & Answers

Q : What’s the difference between the HTML form methods GET and POST?
A : The method parameter specifies which method the client is using to send information to the WEB server. The method determines which parameter you will search the CGI request data in:
* POST - post_args
* GET - http_search_args

Q : What is a tag?
A : 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 one page to another page.

Q : What are meta tags and why it is used?
A: Html tag in the header section of a web page, intended to offer content to search engines. Among them are the keyword and description tags, but these days are most true search engines de-emphasize or completely ignore META tags. ...

Q : What are the differences between DIV and SPAN?
A : DIV is used to select a block of text so that one can apply styles to it. SPAN is used to select inline text and let users to apply styles to it. The main difference between DIV and SPAN is SPAN does not do formatting by itself. Also the DIV tag is used as a paragraph break as it creates a logical division of the document in which it is applied. This is in contrast to the SPAN as SPAN simply dos the functionality of applying the style and alignment whatever was specified in it. DIV has ALIGN attribute in it which is not present in case of SPAN. Thus DIV is used in cases where one wants to apply styles to a block of text. But there may be situations in which that the there might not be clear well structured block of text to work with. In those cases one can do opt to apply SPAN which is used to apply styles inline. That is in other words DIV is generally used for block of text and SPAN is generally used for words or sentences.

Q : How do you change the title of a framed document?
A : The title displayed is the title of the frameset document rather than the titles of any of the pages within frames. To change the title displayed, a link to a new frameset document using
TARGET="_top" (replacing the entire frameset).

Q : How do you link to a location in the middle of an HTML document?
A : First, label the destination of the link. The old way to label the destination of the link was with an anchor using the NAME attribute.
For example:

Section 2: Web Page



The modern way to the label destination of the link is with an ID attribute.
For example:

Section 2: Web page



Second, link to the labeled destination. The URL is the URL of the document, with "#" and the value of the NAME or ID attribute appended. Continuing the above examples, elsewhere in the same document you could use:
go to Section 2

Q : How do you remove the border around frames?
A : Removing the border around frames involves both not drawing the frame borders and eliminating the space between the frames. The most widely supported way to display borderless frames is FRAMESET ... BORDER=0 FRAMEBORDER=0 FRAMESPACING=0".
Note that these attributes are proprietary and not part of the HTML 4.01 specifications. (HTML 4.01 does define the FRAMEBORDER attribute for the FRAME element, but not for the FRAMESET element.) Also, removing the border around a frame makes it is difficult to resize it, as this border is also used in most GUIs to change the size of the frame.

Q : Explain in brief about the term CSS.
A : A stylesheet language is used to describe the presentation of a document written in a markup language. Cascading Style Sheets are a big breakthrough in Web design because they allow developers to control the style and layout of multiple Web pages all at once.

Q : What are the attributes that make up a DHTML?
A : DHTML is called as a Dynamic HTML. This is used to increase the interactive ability and the visual effect of the web pages which is loaded in the browser. The main technologies that are used in DHTML are namely:

HTML
JavaScript
CSS which is also called as Cascading Style Sheet
DOM also called as Document Object Model

Let see the DHTML namely briefly about

HTML:
This is also known as hyper text markup language. This is widely used in web pages. This along with JavaScript plays a vital role for enhancing the features of web pages. In other words the JavaScript is inside the HTML page and this is read by the browser as soon as the page gets loaded.

JavaScript:
JavaScript is the most popularly used scripting language for client-side. The use of JavaScript within the HTML page adds interactivity ability to web pages and this was introduced by Netscape.


DOM:
DOM is called as Document Object Model. This is platform and also language independent. This is used for dynamic access and updating of contents in documents


CSS:
CSS is called as Cascading Style Sheet. This is used to enhance the features of web pages like formatting styles say bold, font size and so on and there by increase the visual appearance of web pages. These are specified inside an HTML tag.

Q : Why is there extra space before or after the table?
A : This is often caused by invalid HTML syntax. Specifically, it is often caused by loose content within the table (i.e., content that is not inside a TD or TH element). There is no standard way to the handle loose content within a table. Some browsers display all loose content before or after the table. When the loose content contains only multiple line breaks or empty paragraphs, then these browsers will display all this empty space before or after the table itself.
The solution is to fix the HTML syntax errors. All content within a table must be within a TD or TH element.

Q : What’s the difference between jscript and javascript?
A : JScript & javascript are both scripting languages that facilitate
development of web pages. It is similar to javascript with subtle difference in objects & functions exposed. JScript is supported and shipped by Microsoft and may be work best only on IE where as Javascript was initiated by netscape and can do work across all browsers consistently

0 comments:

Your Ad Here