css (Cascading Style Sheets)
Tags: css, beginners
Published: 2021-12-23 06:44:35

1. What Flex layout? Difference Flex and grid layout?
Flex layout is a one-dimensional design that is either row-wise or column-wise direction. flexbox can work together in a layout. Grid was designed for a two-dimensional design that is row-wise and column-wise at the same time.

2. Explain CSS position property? What are some differences between absolute position and relative position?
CSS position property in the specific type of position method in CSS, so many types of position in there these are relative, static, absolute, fixed, sticky. Relative positions are similar to static positions, relative positions have taken their place in normal flow you can finalize the position. The absolute position was taken out of the normal flow, you can set their position right, left, top, bottom, also independent position.

3. What is a box model? And what are the different elements of a box model?
The box model is used for design and layout, the box model is around all HTML elements. it consists of margin, border, padding, and the actual content. The CSS box model is a container that contains multiple properties including margin, padding, border, and content .it can be used in different layouts and different designs.

4. What is a Hover effect? What is the purpose of the active class?
The hover effect can trigger multiple steps of animation when the user hovers on the mouse over an element with the cursor, it can bring interactive motion and design active class is basically used in the navigation element user will view the profile.

5. What are the different types of Selectors in CSS?
CSS selectors are always used in HTML elements, CSS selectors have five categories, that is according to their id, class attributes, types, etc it is called simple selectors. Select elements based on the specific relationships between them called combinator selectors. Select an element based on a certain state called pseudo-class selector. Selecting a specific style is a part of an element called pseudo-element selectors. Select element based on an attribute or  attribute value 

6. What is CSS Specificity?
 when multiple selectors are used then only the last selector declaration is found in CSS. specificity means the browser decides which CSS property is most relevant to an element and the best matching style. specificity is a weight that is applied to a given CSS declaration determined by the number of each selector type in the matching selector.

7. What is a CSS Preprocessor? What are some benefits of Sass?
if you want to use a CSS preprocessor, then you must install a compiler on your web browser. SAss is the best CSS preprocessor, SASS contains less code is CSS, its more powerful than CSS, it’s compatible with all versions of CSS

8. What is a Pseudo element? What is pseudo-class?
pseudo-element is a keyword added to a selector that selected part of the selected elements. And also can use d for decoration. In CSS pseudo-element is a keyword added to a selector that can be used in the first line of a paragraph

9. How will you use media queries to make a website responsive?
CSS media Querries allow you to create a responsive website that looks on all screen sizes, from desktop to mobile, Media query is the CSS technique, It is used in the @media rule, major and minor breakpoint

10. How will you make font size responsive? 
Font size can be set with  VW unit which means viewport width then font size follows the browser window.

11. What are the different types of style sheets?
In CSS there are three types of style sheets is External, internal, inline. Inline-styles are used in an element and directly apply to the tag. External style is a separate CSS file Internal style sheet is used to add a unique style for a single document  it is defined in the <head> section of the HTML page

12. What is the difference between the usage of an ID and Class?
In CSS ID is single and can be assigned a single element. when a specific style is using then we use the ID in the Tag. In CSS classes are not unique and multiple elements can have the same class .multiple class can add to the same element.

14. What is Z-index in CSS?
The z-index default value is zero and can take on either a positive or negative number. Z-index sets the property to its default value .also z-index can take more values that are auto stack order equal to the parent element. The number is stack order, the initial property to its default value zero inherits this property from its parent element. 

15. What are the CSS spirits?
CSS sprites combine multiple images into one single larger image. It is a commonly used technique for icons .each image has a separate class. if you want to use that image then add the corresponding class to your element. 

16. What is the float property used in CSS?
Answer: In CSS the float property used in element on the left or right side of the container also text and inline element wrap it. if an element removes from the web page then it remains a part of the flow.

17What is the overflow property in CSS used for?
The overflow property specifies what should happen if content overflow from the element box or container, this property specifies whether clip content and add scrollbar then if the element is too big to fit in a specified area then we use overflow: hidden, overflow:scroll:overflow: visible, overflow: auto.

18.What is the difference between {visiblity:hidden } and {display:none} ?
In CSS display none means the style is not shown in the web page also does not appear in the web page and there will be no space for style. In CSS Visibility: hidden means not like that display: none, that tag is not visible but location cover in the web page ., but not seen the page.

19. Is there case-sensitive in CSS?
There is no case sensitivity in CSS although font -families, and URLs have case sensitive.

20. How can image repetition of the backup be controlled?
By using ‘no-repeat if the image is to be displayed once controls the repetition of images in the background.