SOOPRO Pathshala provides CSS Interview Questions and Answers
CSS stands for Cascading Style Sheet. It is used with HTML to design websites.
SGML (Standard Generalized Markup Language) is the origin of CSS.
ID is unique. A particular ID can be only assigned to a single element.
Class are not unique and multiple elements can have the same class.
A CSS selector permits you to choose and operate HTML elements.
CSS selectors are used to selecting or find HTML elements created on their id, class, type, etc.
Block Element:Block elements always start on a new line and occupy an entire row or width.
Examples of block elements are 'div' and 'p' tag.
Inline Elements:Inline elements do not start on a new line; they appear on the same line as the content and tags beside them
Examples of inline elements are 'a', 'strong' and 'img' tags.
Inline-block Elements:Inline-block elements are similar to inline elements, but they can have padding, margins, and set height and width values.
A responsive web design is about design and development that responds to the user activities and the components involved such as screen size, platform, and orientation.
It comprises a mix of flexible grids, layouts, images, and intellectual use of CSS mdeia queries.
To change the font size of an element in CSS, you can use the font-size property. The font-size property can accept various units like px(pixels), em, rem , % (percentage) and more.
The float property in CSS is used to position an element to the left or right of its containing element, allowing other elements to wrap around it. It is commonly used for creating layouts with multiple columns or for aligning images within text.
The CSS display property is used to control how an element is rendered on the page. It defines the display behavior of an element - whether it should be treated as a block-level element, an inline element, or other display types like flex or grid.
To add a background image to an element in CSS, you use the background-image property. You 'll need to provide the URL of the image file within the url() function as the property' value.
The CSS opacity property is used to control the transparency of an element. It accepts a value between 0(completely transparent) and 1 (fully opaque).
CSS animations and transitions allow you to add dynamic effects to elements.
A universal selector is a selector that matches any element type's name instead of selecting elements of a particular type.
The CSS box model defines the layout and design of CSS elements. The elements are content (like text and images, padding (the area around content), border (the area around padding), and margin (the area around the border).