LATEST POPULAR

CONTACT

[contact-form-7 404 "Not Found"]

CSS3 Interview Questions and Answers

Q1.What is CSS ?
The full form of CSS is Cascading Style Sheets. It is a styling language which is simple enough for HTML elements. It is popular in web designing, and its application is common in XHTML also.

Q2.What is the use of CSS3 sprites?
In a web page we are using many images to decorate. All these image takes time to load individually. This old fashion of image loading increases http request to server. It hampers the performance of web page. To resolve this CSS3 comes with sprites. It helps to keep many images in a single file. Due this it decreases the http request to the server. Gives better performance and taking less server time.

Q3.Which property is use to give rounded corners in CSS3?
The ‘border-radius’ property is used to give rounded corners in CSS3. The rounded corners can be given to any element using this property.
Example:

Q4. What is the origin of CSS ?
Standard Generalized Markup Language marked the beginning of style sheets in 1980s.

Q5. Tell me some New features in CSS3.
CSS3 is the 3rd revision of CSS. Compare to CSS2 CSS3 introduced the following new features.
Calculating value with calc()
In CSS2 to set dynamic width we use JavaScript or Jquery. This problem is resolved in CSS3. CSS3 introduced calc() function. For an example if you want to set a div (#container) with 100px less then the 100% width then you can do the following using CSS3 calc method.
#container {
/* Calculate the width Dynamically */
width: calc(100% – 100px);
margin: 0 auto;
}

Q6. What is the syntax for adding multiple background images in CSS3?
CSS3 allows you to set multiple background images by calling local stored images.
Following syntax is used for adding multiple background images.

Q8. What is Grouping in CSS3?
About CSS3 Grouping let us discuss an example to make you more clear on this. Some time in our page we have h1, h2, h3 .. h5, h6 tags. If I want to apply font color red to all this tags. Here grouping comes. Let you watch the below example. It will clear your understanding.
h1, h2, h3 {color: red;}

Q9. What do you know about word wrapping in CSS3?
In CSS3, word wrapping means breaking the long words into next line.
Syntax: word-wrap: break-word;

Q10. What are the limitations of CSS ?
Limitations are:
• Ascending by selectors is not possible
• Limitations of vertical control
• No expressions
• No column declaration
• Pseudo-class not controlled by dynamic behavior
• Rules, styles, targeting specific text not possible

Q11. What are Child Selectors in CSS?
In CSS3 Child Selector used to to apply styles upon the child elements of a parent elements. Lets for an example I have a ul tag inside a paragraph. Here ul is the child element of paragraph. To apply CSS styles we can use the following CSS3 syntax.
p > ul { font-size:20px; }

Q12. What is the use of Media Queries in CSS3?
Media Queries use the @media rule to include a block of CSS properties only if a certain condition is true.

Q14. What is the syntax to avoid repetitive background images using CSS?
To avoid repetitive background images, you can use “background-repeat” property with no-repeat value.
“background-repeat” property has two values: repeat and no-repeat.
By default background-repeat property has repeat value.