![]() |
VOOZH | about |
A CSS ruleset is the foundation of how styles are applied to HTML elements on a web page. It consists of a selector and one or more declarations, which define how elements are displayed.
A declaration specifies a CSS property and its value, separated by a colon (:). Declarations must end with a semicolon (;).
The declaration block to style the body of an element can be written by keeping body as a selector and the declaration must be kept within these {} braces.
The declaration block to style the h1 element by using an element selector.
The box model describes the structure of an element as a rectangular box consisting of content, padding, border, and margin.
CSS positioning controls how an element is placed on a page using properties like static, relative, absolute, fixed, and sticky.
Flexbox is a layout model that provides efficient alignment and distribution of space among items in a container, even if their size is dynamic.
Using media queries to adjust styles for different screen sizes.
A pseudo-class is a keyword added to a selector that defines a special state of the selected elements. For example, you might want to style an element when the user hovers over it, or when a link has been visited.
A pseudo-element allows you to style specific parts of an element, such as the first letter or the first line, or even insert content before or after the element.
Note: Double colons :: are recommended for pseudo-elements, but some older browsers also support a single colon :
You can use pseudo-classes and pseudo-elements together for advanced styling. On hovering the button a flame symbol will appear before the content ie Click me in the button.