Monday, March 9, 2009

10 Most common questions always asked in an interview

I have worked with almost 7 oragnisations during my career and there's lots of questions asked in interview related to the CSS & HTML. I'm going to share some most common questions that always asked in an interview:

Qestion 1 - How many types of CSS we use?

Answer: There are three types of CSS we generally use - External CSS, Embedded CSS and Inline CSS.

Examples:

External CSS
<link href="/css/test.ccs" rel="stylesheet" type="text/css" />

Embedded CSS
<style TYPE="text/css">
<!--
body {
background: black;
color: #80c0c0 }
a:link { color: #ff8080 }
a:visited { color: #ff0000 }
a:active { color: #a05050 }
-->
</style>


Inline CSS
This can be use with <span> tag:
<span style="width:50%; height:40px; font:arial 12px"></span>



Qestion 2 - What is the difference between id and class?

Answer: IDs identify a specific element and therefore must be unique on the page – you can only use a specific ID once per document. Many browsers do not enforce this rule but it is a basic rule of HTML/XHTML and should be observed.

Classes mark elements as members of a group and can be used multiple times, so if you want to define a style which will be applied to multiple elements you should use a class instead.



Qestion 3 - What is the difference between gif and jpeg?

Answer: JPEG (Joint Photographic Experts Group) is a standardised image compression mechanism. JPEG is designed for compressing either full-colour (24 bit) or grey-scale digital images of "natural" (real-world) scenes.

GIF (Graphics Interchange Format) It is an 8 bit format which means the maximum number of colours supported by the format is 256.



Qestion 4 - What is the major difference between CSS2 and CSS3?

Answer: Click here



Qestion 5 - What is the major difference Web 2.0 and Web 3.0?

Answer: Click here



Qestion 6 - What is the difference between HTML and XHTML?

Answer: Click here



Qestion 7 - How to show two events on a single click by using Onclick event in HTML?

Answer: Click here



Question 8 - How we can define a new font in CSS?

Answer: .fontstyle{font-family:"courier new"}



Question 9 - What do you mean by clear:both in CSS?

Answer: Image and text elements that appear in another element are called floating elements. The clear property sets the sides of an element where other floating elements are not allowed.



Question 10 - Why we should use DIVs instead of tables?

Answer: It is semantically wrong to show non-tabular stuff in a table.

Related Posts :





1 comments :

Anonymous said...

Question 5 should read Web 3.0, not CSS 3.0

Post a Comment

 

Copyright © 2009 - tutorialfeed.org