Category: 02. CSS
-
Name some font-related CSS attributes
The font-related attributes are Font- style, variant, weight, family, size, etc.
-
Tell us about the property used for image scroll controlling?
The background-attachment property is used to set whether the background image is fixed or it scrolls with the rest of the page. Example for a fixed background-image: body { background-image: url(‘url_of_image’); background-repeat: no-repeat; background-attachment: fixed; }
-
How can you use CSS to control image repetition?
The background-repeat property is used to control the image. Example: h3 { background-repeat: none; }
-
How can you target h3 and h2 with the same styling?
Multiple elements can be targeted by separating with a comma: h2, h3 {color: red;}
-
Define z-index.
This is one of the most frequently asked CSS interview questions. Z-index is used to specify the stack order of elements that overlap each other. Its default value is zero and can take both negative and positive values. A higher z-index value is stacked above the lower index element. It takes the following values- auto,…
-
What is the difference between a class and an ID?
Class is a way of using HTML elements for styling. They are not unique and have multiple elements. Whereas ID is unique and it can be assigned to a single element.
-
What was the purpose of developing CSS?
CSS was developed to define the visual appearances of websites. It allows developers to separate the structure and content of a website that was not possible before.
-
What is meant by RGB stream?
RGB represents colors in CSS. The three streams are namely Red, Green, and Blue. The intensity of colors is represented using numbers 0 to 256. This allows CSS to have a spectrum of visible colors.