Top css Interview questions and answers-1

Posted by Stephen thangaraj at 19:20

Part-1

1) What are cascading style sheets?
Cascading style sheets help the designer in various ways. It primarily helps to design style sheets for content and HTML pages. It can be applied to any XML document or mark up language.

2) Explain about some of the features of CSS?
Some of the features used by CSS are to define a layout, colors, fonts, etc. It separates the content from the design part which makes the content much more visible thereby improving productivity of the entire process. It can make the same page appear in different formats.

3) Explain about the rules present in style sheets?
A huge list of rules is defined for style sheets. Each rule consists of selectors and declaration block. A declaration block consists of declarations which can be defined and separated by using a semicolon within curly braces. Also each declaration consists of a colon, a property and a semicolon.

4) Explain about the hover element?
A hover element is activated when the user moves a pointer over the area where HTML coding is defined. This style is being extensively used for online advertising. It is appended to #elementid:hover.

5) State some of the uses of CSS?
CSS offers many possibilities to a designer and developer. Some of them are
1) Moving of the entire style sheet coding to a separate external folder.
2) Repetition and code reuse features make CSS rich.
3) Presentation and structure are made different by CSS etc.

6) State the different type of author styles?
A web page author, developer, designer, etc can describe styles in three different forms they are
1) External style sheets
2) Embedded style
3) Inline styles
4) Local and default style sheet.
A default style sheet consists of the style imparted by the browser which the user is accessing for the information.

7) What are the main goals of applying style sheets?
The main use of style sheet is to give the user a greater degree of control over his presentation. If the user does not like a certain font he can change it with flexibility without any difficulty.
Also a developer can minimize the effects which a browser can have on the application or the text part of the webpage.
Control over the entire web page without any external influences, separation of the page from the HTML code part.

8) Explain about CSS1?
W3C recommended adoption of CSS1in 1996. Some of the capabilities and features present in CSS1 are as follows.
1) Font properties
2) Background colors, text colors, etc
3) Spacing between text, words, etc
4) Tables, images alignment
5) Border, margin, padding and positioning of elements
6) Attributes are uniquely identified and classified generically.
W3C still adopts the specifications put forwarded in CSS1.

9) What are the additional features which were present in CSS2 compared to CSS1?
Many of the new features were present in CSS2 some of them are as follows.
1) Positioning of elements will be according to the relative, fixed and the absolute positioning.
2) Inclusion of large number of media functions.
3) Shadows, bidirectional support for text and aural style sheets.

10) Explain about CSS filter?
CSS filter solves designers and coders difficulties. With the help of these filters one can write entirely different code or modify the existing design patterns so that browsers receive CSS specifications which they support, thereby not allowing the browsers to make or create any unnecessary changes.

11) Explain about Internet explorer box model bug?
Designers had a very tough time dealing with this bug, because it will not display box widths appropriately on the webpage. It displayed the block to be narrow in size. This bug can be rectified by using CSS filter and hacks. Also correct usage and documentation of XHTML can solve the problems.

12) Explain about vertical control limitation?
Vertical control limitations are always a nightmare for a designer. Horizontal positioning of text or element is always easy but vertically positioning an element always leads to convoluted and impossible tasks. CSS has unsupported rules for vertical placement of elements.

13) Explain about absence of expressions?
CSS currently does not have the ability to specify property values as simple expressions. For example if you want to calculate the size of all the columns but you have a restriction on the sum of all columns. This problem has been solved by many browsers by proprietary expressions which did the job well.

14) Explain about lack of orthogonality?
Lack of orthogonality explains about the various multiple jobs which are either undefined correctly for a specific application or used multiple times for the same job. CSS defines that internal elements of a table will not have margins so usage of border spacing is appropriate which leads to confusion.

15) Explain about the ease of maintenance with CSS.
An effective style sheet has effective use of inheritance and cascading style sheets. When changes are applied to a single element of this global style sheet every element of the web page changes. This made the maintenance easy because here we can change the style of the whole page by effecting a change to a single element.

16) Explain about float containment?
CSS does not support float elements as it can cause overflow of the elements. Floats also tend to vary according to the web browser resolution and size but positions do not. There are some multiple properties which can define about float but they have their own limitations.

17) State some limitations of style sheets?
Style sheets do have its own share of limitations some of them are as follows: -
1) Inconsistent browser support
2) Vertical control limitations
3) Margin collapsing, float containment, control of element shapes, etc
4) Lack of column declaration and variables are some of the limitations present in CSS.


If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!


Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE

1 comments:

OneStop Shop of Information on 23 January 2016 at 23:14 said...

Cascading Style Sheet (CSS) is a technology using which we can centralize styles for our web-page. CSS3 is the latest revision of CSS. Are you decided to establish your Career as a UI designer? If so this page can help you to gain knowledge over CSS. Including interview questions & their answers here we covered nearly all the basics & advanced features of CSS3 http://jharaphula.com/top-css3-interview-questions-with-answers


Have any question? Feel Free To Post Below:

Blog Archive

 

© 2011. All Rights Reserved | Interview Questions | Template by Blogger Widgets

Home | About | Top