Home CSS job interview questions – Top 10
« Home »
Mar 10th, 2013 Comments: 0

CSS job interview questions – Top 10

Tags
Plurk
Share this

CSS interview questions

 Q1)What is CSS?

It stands for Cascading Style sheet which is used for styling HTML as it collect common properties for tag or group of tags and apply consistent look and behavior to them.

Q2)Why it’s necessary to Use CSS?

In general, CSS is used to separate content of web pages from design “avoid spaghetti code, the same as the servlet do with JSP in development”. That’s good for team work as the designed will not interfere with that who is writing the web page and scripts at all in addition to arrangement process.

CSS also essential to control the look of the web page without involving the web page itself in the design as all will happen is to reference the place of the css file in the web page.

 

Q3)How to apply styles to a page?

There are many ways to apply the style to the web page, like:

implicitly: can write the style code inside <style> tag inside the page

explicitly: by writing the style code in a separate file .css and link it using <link> tag

inline: by using style attribute

 

Q4)what is a class in css?

It’s a group of css attributes specified by a name and is applied to HTML tags. It’s identified by . Followed by class name and then the set of attributes that describe it.

Ex: .className {..,..,..;}

 

Q5)Talk about word – wrapping in CSS3

sometimes while writing in a container on a web page, the end of line terminated on a long unfinished word. What actually happen as it’s drawing that  it continue getting out the border.

It’s not cool at all and is considered to be a bug specially if the application is interactive “i.e. the user is writing on a container”

the solution was provided CSS3 in word-wrap property which wrap the long words to the next line.

It’s supported by all browsers , so it’s so good so far.

Q6)What is comments in css3? How to apply comments?

Comments are human readable instructions that are written by the designer in order to describe his code.

Comments are not interpretable by the browser.

It can be written inside /*    */.

Q7)is it possible to eliminate borders from a certain object in html page using css?

Yes , easily set border property of that object to none.

 

Q8) Is CSS Case sensitive?

No. except when using XHTML it become case sensitive for some browsers “not all”

 

Q9)Show an example of using shadows in CSS3

<!DOCTYPE html>

<html>

<head>

<style>

h1

{

text-shadow: 5px 15px 2px threedhighlight;

}

</style>

</head>

<body>

 

<h1>OMG! it’s true shadow</h1>

 

</body>

</html>

 

Q10) is the linking method is the same when linking CSS with XML?

No, Completely Different

 

Q11) talk about responsive design

it’s a terminology that describes the ability of website of being displayed in the same consistent look in different devices like mobiles, desktops, laptops , …etc

it’s not stable yet since it differ from one device to another and requires much efforts from the designer to over come this problem.

With the help of responsive design, this problem is partially solved.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>