SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Friday, July 29, 2011

Web developer interview Questions

As i was sophisticated with web development by developing the XHTML Templates, so i was looking for a change.
I wanted to share a hand­ful of the ques­tions which i came across
1.Tool tip attributes for IMG element for IE browsers ?
IE browsers by default uses title as tooltip, if title is empty then it will use alt attribute as tooltip

2.What is meant by Box model?
All HTML elements can be considered as boxes.The CSS box model is essentially a box that wraps around HTML elements, and it consists of: margins, borders, padding, and the actual content.

3.What are the types of positioning?
The CSS positioning properties allow you to position an element.Elements can be positioned using the top, bottom, left, and right properties. However, these properties will not work unless the position property is set first.

Types of Positioning:
a)Static :By default all elements are positioned static
b)Fixed : Element with fixed position is positioned relative to the browser window
c)Relative : Element is positioned relative to its normal position.
d)Absolute : Element is positioned relative to the first parent element that has a position other than static
e)Overlapping : Elements are positioned outside the normal flow, they can overlap other elements.The z-index property specifies the stack order of an element.

4.Difference between px and em
em : 1em is equal to the current font size. 2em means 2 times the size of the current font.
px : pixels (a dot on the computer screen)

5.What are selectors?
selectors are patterns used to select the element(s) you want to style.Mostly used selectors are class & id selectors.For more details please check css tutorials

6.What are attribute selectors ?
The [attribute] selector is used to select elements with the specified attribute.

[attribute] [target] Selects all elements with a target attribute
[attribute=value] [target=_blank] Selects all elements with target="_blank"
[attribute~=value] [title~=flower] Selects all elements with a title attribute containing the word "flower"
[attribute|=language] [lang|=en] Selects all elements with a lang attribute value starting with "en"

7.How we can apply styles for a particular text box ?
By using attribute selectors we can apply style to a particular textbox.
Ex: input[name="email"]{border:1 px solid red}

8.What is jQuery and why we need it?
jQuery is a JavaScript Library.It is fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

10.What is the $ symbol in jQuery?
Dollar Sign is nothing but it's an alias for JQuery

11.How we can change the $ symbol in jQuery ?.
var dom = {};
dom.query = jQuery.noConflict(true);

12.please write a toggle script not using any javascript libraries?

13.How to replace a text inside a html element using javascript ?
var a=1;var b=2;var c=3;
a=b=c;
b=c=a;
c=a=b;
what is a?