InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How to use pseudo-elements in CSS3? |
|
Answer» In CSS, pseudo-ELEMENT is used to style detailed and SPECIFIC parts of an element. For EXAMPLE, it may be used to:
It is a keyword added to a selector that lets you in styling a specific part of the SELECTED element(s). For example, ::first-line is used to change the font of the first line of a paragraph below. p::first-line { |
|
| 2. |
What is the use of hsl()? |
|
Answer» The CSS3 HSL() FUNCTION is used to provide a color value when using CSS. It allows users to SPECIFY a color value by determining the HUE, saturation, and light (which REPRESENT HSL) components of the color. |
|
| 3. |
What is linear-gradient() used in CSS3? |
|
Answer» In CSS3, the linear gradient STARTS at the top with the color red, transitioning to yellow and later to blue. It sets a linear gradient as the background IMAGE. USERS have to define at least two color STOPS to create a linear gradient. |
|
| 4. |
What is the use of calc()? |
|
Answer» The calc() function in CSS3 is used for SIMPLE CALCULATIONS to determine CSS PROPERTY values present right in CSS. It allows mathematical expressions with addition, subtraction, multiplication, and DIVISION to be used as component values. |
|
| 5. |
Explain CSS3 Animations? |
|
Answer» CSS3 animations allow HTML element animation WITHOUT USING Flash or JAVASCRIPT. It lest elements GRADUALLY CHANGE form one style to another. The users must have to specify some keyframes for the animation to apply CSS3 animation. |
|
| 6. |
What is word-break property used in CSS3? |
|
Answer» In CSS3, the word-break property is USED to SPECIFY how words should break when reaching the END of a line. The syntax for the word-break property is as follows: Examplep.a { |
|
| 7. |
List some newly introduced Text related features in CSS3? |
|
Answer» CSS3 has a NUMBER of text RELATED features INTRODUCED with it. Here are a few best of them:
|
|
| 8. |
What is gradient and explain its types? |
|
Answer» In CSS3, GRADIENTS let USERS display smooth transitions two or number of specified colors. CSS defines two types of gradients, which are:
|
|
| 9. |
List some css3 new style properties? |
|
Answer» CSS3 has plenty of NEW STYLE properties in addition to it. Box-shadow: Used to effect the surround item containers on a webpage. |
|
| 10. |
How we can add border to a image? |
|
Answer» Users have to apply the BORDER-image property to SPECIFY the image to be USED as the border around an element. ExampleIMG { |
|
| 11. |
How to create rounded corners? |
|
Answer» The border-RADIUS property is used to give any ELEMENT rounded corners. This property DEFINES the radius of an element’s edge.
|
|
| 12. |
Explain CSS3 Selectors. |
|
Answer» CSS3 selector is a part of the CSS3 rule SET that SELECTS the content that the USER wants to style. There are different types of SELECTORS available in CSS3.
|
|
| 13. |
What are the different types of style sheets? |
|
Answer» There are three types of CSS available for users as following,
|
|
| 14. |
Who is the founder of CSS & when CSS3 released? |
|
Answer» CSS is founded by Hakon Wium Lie and first RELEASED on December 17, 1996, as an official World WIDE Web Consortium. CSS3 is the most ADVANCED version of CSS and was released in JUNE 1999. |
|
| 15. |
What is the syntax of opacity in css3? |
| Answer» | |
| 16. |
What are the different web fonts formats in CSS? |
| Answer» | |
| 17. |
What is the function of the CSS clear property? |
| Answer» | |
| 18. |
What is text-overflow property use in css3? |
| Answer» | |
| 19. |
What is the difference between “word-break: break-all” and “word-wrap: break-word” in CSS? |
| Answer» | |
| 20. |
What is a flexbox layout? |
| Answer» | |
| 21. |
What is the white-space property in CSS? |
|
Answer» White-space is a PROPERTY WITHIN CSS which helps in CONTROLLING whitespace and other line BREAKS INSIDE an element’s text. It has a default value of normal. Here’s an example to display the different values within a white-space property: p.e { |
|
| 22. |
How does the Z Index work in CSS3? |
|
Answer» In CSS, the z-index property specifies the stack ORDER of elements. An element having a greater stack order is placed in FRONT of an element with a lower stack order. Here’s its CSS Syntax:z-index: auto|number|initial|inherit; Here’s an EXAMPLE to set the z-index of an image: img { |
|
| 23. |
What is the use of CSS3 Sprites? |
|
Answer» CSS3 Image SPRITES are a collection of images put in a single image to reduce the number of SERVER requests, thereby saving bandwidth, and AVOIDING multiple server requests for each image. #homeDiv { In the above EXAMPLE, we have combined 3 images into a single GIF, cssprites and we can use CSS to display a specific part as required. |
|
| 24. |
What is attr()? |
|
Answer» In CSS3, the attr() FUNCTION is used to RETRIEVE the VALUE of an attribute of the element selected and use it in the style sheet. This function ALSO can be used on pseudo-elements, in which case pseudo-element's originating element attribute value will be returned. |
|
| 25. |
What are the difference between CSS and CSS3? |
|||||||||||||||
Answer»
|
||||||||||||||||
| 26. |
How to apply CSS to all elements? |
|
Answer» To apply CSS to all elements, USE the CSS * Selector. Example:* { This SELECTS all the elements and changes their background color to blue. |
|
| 27. |
What is media query in CSS3? |
|
Answer» The media query is a technique used to produce a tailored style sheet, better KNOWN as RESPONSIVE web design, to desktops, tablets, laptops, and other mobile DEVICES. We can also use media QUERIES to specify CERTAIN styles required for printed documents or for screen readers. |
|
| 28. |
What is tweening in CSS? |
|
Answer» Tweening is a term that's not used too often in CSS. It has its roots in computer animation and products like Flash. In tweening, rather than telling the program exactly how to render each frame, the animator/designer would TELL the program what position the objects are in at two "keyframes" while the program figures out how to do the transition of the objects between the two mentioned points. Here’s an example of sliding in an element from the left SIDE of a browser screen using tweening. Examplep { |
|
| 29. |
How to use before and after in CSS3? |
|
Answer» <P>The ::before the selector is used to INSERTING something before the CONTENT of any selected element. WHEREAS, the ::after selector to insert something after the content in a specified element. Syntax for before selector:::before { ::after { p::before { p::after { |
|
| 30. |
What is the grouping selector in CSS? |
|
Answer» The grouping SELECTOR in CSS SELECTS all the HTML elements with the same style DEFINITIONS. This will be better to group the selectors, to minimize the code. The comma is a grouping method, it selects all the MATCHING nodes. Example: div, span will match both <span> and <div> elements. |
|
| 31. |
What are the new color properties in CSS3? |
|
Answer» The CSS3 has included 147 additional color keywords introduced in it. CSS3 also offers a number of other color options to USERS such as HSLA, HSL, and RGBA. These color types also have the ability to declare semitransparent colors. Also Read: HTML5 Interview Questions and Answers |
|
| 32. |
How to create shadow effect in CSS3? |
|
Answer» The box-shadow property is used to add shadow EFFECTS around any ELEMENT’s frame. Users can set MULTIPLE effects to a portion separated by commas. Usually, it is described by X and Y offsets relative to the part, color, and blur and spread radii. Also Read: What are the LATEST Features in Bootstrap 4Example#box { |
|
| 33. |
What are the possible ways to apply CSS styles to a Web page? |
|
Answer» CSS can be applied to any web page USING the FOLLOWING THREE ways: |
|