CSS Reference
This guide tracks 727 CSS properties and selectors. It includes syntax usage and browser support data for every entry. You can see how each feature works across major browsers.
CSS Properties 516 items
-webkit-text-fill-color
Sets the color for the inside of text characters. It's almost always used alongside 'background-clip: text' and a transparent 'color' to create text with image backgrounds or gradients.
-webkit-text-stroke
A shorthand for setting both the thickness and the color of text outlines in one line. Great for creating 'hollow' or 'ghost' text effects.
-webkit-text-stroke-color
Sets the color of the outline (stroke) around text characters. Best used with a large font size to ensure the text remains readable.
-webkit-text-stroke-width
Defines how thick the outline (stroke) around text characters should be. Keep it subtle (1-2px) to prevent the text from looking distorted.
accent-color
Sets the accent color for user-interface controls like checkboxes, radio buttons, and range sliders. It allows you to style native forms with your brand color with a single line of CSS.
align-content
flexboxAligns a flex container's lines within it when there is extra space in the cross axis, similar to how justify-content aligns individual items within the main axis.
align-items
flexboxDefines the default behavior for how items are aligned along the cross axis (perpendicular to the main axis) in a flex or grid container.
align-self
flexboxAllows you to override the default alignment for a single item inside a Flex or Grid container. While 'align-items' sets the default for everyone, 'align-self' lets one item 'do its own thing'.
alignment-baseline
Controls how an inline-level element (usually SVG text) aligns itself with the vertical baseline of its parent. It's essentially the 'vertical-align' for SVG text.
all
A 'big reset' property that forces every single CSS property on an element (except direction and language) back to its starting state. Useful for clearing out unwanted styles from themes or parent elements.
anchor-name
Defines a unique name for an element so it can be used as an anchor for other positioned elements. This creates the relationship needed for anchor positioning to work.
anchor-scope
Limits where an anchor name can be 'seen.' This prevents anchor names from leaking into other parts of the page, allowing you to reuse the same anchor names in different components safely.
animation
animationsA shorthand property that applies an animation to an element. It links the element to a set of @keyframes and defines how that animation should behave.
animation-composition
animationsDetermines how the browser should mix multiple animations targeting the same property. You can either replace the previous value, add to it, or accumulate it (useful for stacking transforms).
animation-delay
animationsSets a timer before an animation starts playing. You can use positive values to wait, or negative values to make the animation look like it's already halfway through its first cycle.
animation-direction
animationsDefines whether an animation should play forwards, backwards, or alternate back and forth on every other cycle. Useful for creating smooth 'yo-yo' effects.
animation-duration
animationsSpecifies how long it takes for an animation to complete one full cycle (from 0% to 100%). Use seconds (s) or milliseconds (ms).
animation-fill-mode
animationsDetermines how an element should look before the animation starts and after it finishes. 'forwards' is the most common use, as it keeps the final frame of the animation visible.
animation-iteration-count
animationsSets the number of times an animation should play before stopping. You can use whole numbers (1, 2, 3) or 'infinite' for a never-ending loop.
animation-name
animationsSpecifies the name of one or more @keyframes at-rules that should be applied to the selected element.
animation-play-state
animationsAllows you to pause and resume a running animation. Typically used in combination with :hover or JavaScript to freeze an animation when a user interacts with it.
animation-range
animationsA shorthand property for setting both the start and end points of a scroll-driven animation. It's the most concise way to define the 'active window' for a scroll effect.
animation-range-end
animationsDefines where a scroll-driven animation should reach 100% completion. For example, you can stop the animation exactly when an element exits the top of the viewport.
animation-range-start
animationsDefines the exact point in a scroll timeline where the animation should begin (0%). This allows you to delay the start of an animation until an element is partially visible.
animation-timeline
animationsThe 'brain' of modern scroll-driven animations. It links an animation to a timeline other than time—usually the scroll position of the page or the visibility of an element in the viewport.
animation-timing-function
animationsDefines the speed curve of an animation, such as 'ease-in', 'ease-out', or 'linear'. It controls whether the animation feels organic and bouncy or robotic and steady.
animation-trigger
animationsAn experimental property that allows you to define exactly when an animation should start playing based on conditions like visibility in the viewport. It's part of the effort to make scroll and view-driven effects more declarative.
appearance
Used to display an element using platform-native styling. Setting it to none is the first step in creating custom form controls like checkboxes or selects.
aspect-ratio
box modelSets a preferred ratio for an element's width and height, ensuring it maintains a specific shape (like square or widescreen) even as it resizes.
backdrop-filter
Applies graphical effects like blur or color shifts to the area *behind* an element, allowing you to create frosted-glass effects.
backface-visibility
transformsDetermines if you can see the 'back' of an element when it's flipped in 3D space. Setting it to 'hidden' is essential for creating smooth card-flip animations where the back face shouldn't show through the front.
background
backgroundsThe ultimate shorthand for setting all background properties (color, image, repeat, etc.) in a single line. It's the most common way to style backgrounds efficiently.
background-attachment
backgroundsControls whether a background image stays fixed in place or scrolls along with the content. 'fixed' is often used to create a simple parallax-like effect where the page content slides over a static image.
background-blend-mode
Sets how an element's multiple background images and background color should blend with each other.
background-clip
backgroundsSpecifies the 'boundary' for where the background should be visible. For example, you can clip the background to only show inside the element's text, or only within its padding area.
background-color
backgroundsSets the background color of an element. It fills the space behind the content, padding, and border of the element.
background-image
backgroundsSets one or more background images for an element. This can be a URL to an image file or a CSS gradient function.
background-origin
backgroundsSets the starting point for where a background image is positioned. Unlike 'background-clip' which hides parts of the background, 'background-origin' actually shifts the starting (0,0) coordinate of the image.
background-position
backgroundsSets the initial position of a background image. You can use keywords (center, top), percentages, or length values to move the image within its container.
background-position-x
backgroundsSpecifically controls the horizontal (left-to-right) position of a background image. This is useful when you want to change only the horizontal position via hover or animation without touching the vertical position.
background-position-y
backgroundsSpecifically controls the vertical (top-to-bottom) position of a background image. It allows you to adjust the vertical alignment specifically, which is perfect for shifting backgrounds on scroll.
background-repeat
backgroundsSets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all.
background-repeat-x
A non-standard (but widely supported) property that specifically controls whether a background image repeats horizontally. It is usually easier to use the standard 'background-repeat' property instead.
background-repeat-y
A non-standard (but widely supported) property that specifically controls whether a background image repeats vertically. It is usually easier to use the standard 'background-repeat' property instead.
background-size
backgroundsSets the size of the element's background image. Images can be left to their natural size, stretched, or constrained to fit the available space.
baseline-shift
Used in SVG to move text vertically relative to its baseline. It's the primary way to create subscripts or superscripts within SVG text elements without changing font sizes.
baseline-source
Determines which line box's baseline is used as the reference for an element with multiple lines. For example, you can choose to align an inline-block based on its first line of text or its last line.
block-size
logicalDefines the 'height' of an element in a way that respects the writing mode. If you switch from horizontal to vertical text, 'block-size' automatically switches from height to width so your layout remains consistent.
border
backgroundsA shorthand property that sets an element's border width, style, and color in a single declaration.
border-block
logicalThe most powerful logical shorthand for borders. It sets the width, style, and color of both the 'start' and 'end' borders in the block dimension with a single line of CSS.
border-block-color
logicalSets the color of the borders in the block dimension (top and bottom in horizontal text). It's a logical way to style both 'vertical' ends of a box at once.
border-block-end
logicalA shorthand for setting the width, style, and color of the 'end' side border in the block dimension. It's the logical equivalent of styling a bottom border.
border-block-end-color
logicalSets the color of the 'end' side of the block dimension (usually the bottom border). Using logical properties like this makes your CSS more readable for multi-language sites.
border-block-end-style
logicalSpecifies whether the 'end' block border is solid, dashed, dotted, etc. In standard horizontal English text, this corresponds to the bottom border style.
border-block-end-width
logicalDefines the thickness of the logical 'end' border. This is a modern replacement for 'border-bottom-width' that adapts to different writing modes.
border-block-start
logicalA shorthand for setting the width, style, and color of the 'start' side border in the block dimension. Effectively styles the top border in horizontal writing modes.
border-block-start-color
logicalSets the color of the 'start' side of the block dimension (usually the top border). Part of the logical properties set for more flexible layout systems.
border-block-start-style
logicalDetermines the line style (solid, dashed, etc.) for the 'start' side border. In standard western layouts, this is the top border.
border-block-start-width
logicalDefines the thickness of the logical 'start' border. It replaces 'border-top-width' in modern CSS to better support different writing directions.
border-block-style
logicalSets the line style for both block-dimension borders (top and bottom) with one declaration. Using 'solid' is the most common way to define these boundaries.
border-block-width
logicalSets the thickness of the borders in the block dimension (usually top and bottom). It's a convenient way to adjust the vertical thickness of a box's borders simultaneously.
border-bottom
backgroundsThe shorthand to define width, style, and color for just the bottom edge of an element. It's the standard way to create underlines, dividers, and bottom-aligned accents.
border-bottom-color
backgroundsSets the color of the bottom border specifically. It's often used to create 'underline' effects on headings or nav links that are stylistically distinct from regular text underlines.
border-bottom-left-radius
backgroundsSpecifically rounds the bottom-left corner of an element. This is useful for creating unique shapes like speech bubbles or tabbed interfaces where only certain corners should be rounded.
border-bottom-right-radius
backgroundsSpecifically rounds the bottom-right corner of an element. It helps in building modern UI components like cards with soft corners or asymmetric decorative boxes.
border-bottom-style
backgroundsSets the line style for the bottom border. Beyond the standard 'solid', you can use 'dashed' or 'dotted' for separating content blocks without being too heavy.
border-bottom-width
backgroundsControls the thickness of the bottom border. It is frequently paired with a specific color to create focus indicators or status bars.
border-collapse
Determines whether table cells have shared or separate borders. 'Collapse' is the most common setting used to create clean, single-line borders between cells.
border-color
backgroundsA shorthand property that sets the color for all four borders of an element. If you provide four values, it sets them in 'top right bottom left' order.
border-end-end-radius
logicalThe logical way to round the 'bottom-right' corner (in standard English text). It automatically moves to the bottom-left if you switch to a right-to-left language, keeping your layout consistent.
border-end-start-radius
logicalRounds the corner where the 'end' of the block dimension meets the 'start' of the inline dimension (bottom-left in LTR). Like all logical properties, it adapts to the text direction.
border-image
backgroundsA massive shorthand for using an image (or gradient) to style an element's borders. It combines source, slice, width, outset, and repeat into one powerful line of CSS.
border-image-outset
backgroundsControls how far outside the element's actual box the border image is drawn. It's useful for making a decorative border appear as if it's 'floating' around its container.
border-image-repeat
backgroundsDefines how the border image is filled along the edges. 'Stretch' pulls the image thin, while 'repeat' or 'round' tiles it. 'Round' is often best because it scales tiles slightly to avoid cutting them off.
border-image-slice
backgroundsDetermines how to 'cut' the border image into nine pieces (four corners, four edges, and a center). These pieces are then used to build the final border by resizing them to fit your element.
border-image-source
backgroundsSpecifies the image used as the border. You can use an actual image file (URL) or even a CSS gradient, which allows for advanced effects like gradient borders.
border-image-width
backgroundsSets the thickness of the border image. This can be different from the actual 'border-width', allowing you to scale the decorative image pieces independently of the box boundaries.
border-inline
logicalThe logical shorthand for setting width, style, and color for both the 'start' and 'end' borders in the inline dimension (left and right in LTR).
border-inline-color
logicalSets the color for both borders in the inline dimension (usually left and right). It's the logical way to style 'horizontal' edges at once, adapting perfectly for right-to-left text.
border-inline-end
logicalA shorthand for setting the width, style, and color of the 'end' side border in the inline dimension. It's the logical successor to 'border-right'.
border-inline-end-color
logicalSets the color for the 'end' side of the inline dimension (usually the right border). It ensures the border stays on the 'exit' side of text even if the language direction changes.
border-inline-end-style
logicalSpecifies the line style for the logical 'end' border. In standard western layouts, this is the right border style.
border-inline-end-width
logicalDefines the thickness of the logical 'end' border. Replaces 'border-right-width' to ensure the boundary stays on the correct side regardless of text direction.
border-inline-start
logicalA shorthand for setting the width, style, and color of the 'start' side border in the inline dimension. It's the logical equivalent of styling a left border.
border-inline-start-color
logicalSets the color of the 'start' side of the inline dimension (usually the left border). It allows for easier localization without writing direction-specific overrides.
border-inline-start-style
logicalDetermines the line style (solid, dashed, etc.) for the 'start' side border. Replaces 'border-left-style' for better international formatting.
border-inline-start-width
logicalDefines the thickness of the logical 'start' border. It's the modern way to set a left border that flips to the right in RTL languages.
border-inline-style
logicalSets the line style for both inline-dimension borders (left and right) with one declaration. Using 'solid' is the standard for defining box boundaries.
border-inline-width
logicalSets the thickness of both logical inline borders (left and right) simultaneously. A convenient logical shorthand for symmetrical horizontal borders.
border-left
backgroundsA shorthand for setting the physical left border's width, style, and color in one line. Perfect for adding a simple vertical line to the side of an element.
border-left-color
backgroundsSets the color of the left border. While logical properties like 'border-inline-start-color' are often preferred for modern apps, this remains the standard way to target the physical left side specifically.
border-left-style
backgroundsDetermines the line style (solid, dashed, etc.) of the physical left border. Without a set style, the border won't appear even if you give it a width.
border-left-width
backgroundsControls the thickness of the physical left border. It can take keyword values like 'thin' or 'thick', but specific pixel values are most common.
border-radius
backgroundsDefines the radius of an element's corners, allowing you to create rounded corners or circular shapes.
border-right
backgroundsA shorthand for setting the physical right border's width, style, and color. It's the standard physical counterpart to the modern 'border-inline-end' property.
border-right-color
backgroundsSets the color of the physical right border. Useful for specific side-styling where you don't want the side to flip automatically in RTL languages.
border-right-style
backgroundsDetermines the line style of the physical right border. Common values include 'solid', 'double', or 'dotted'.
border-right-width
backgroundsControls the thickness of the physical right border. Often used to create visual separation in navigation bars or lists.
border-spacing
Determines the distance between the borders of adjacent table cells. Note that this property only works if 'border-collapse' is set to 'separate'.
border-start-end-radius
logicalThe logical way to round the corner where the 'start' of the block (top) meets the 'end' of the inline dimension (right in LTR). It adapts to writing mode changes automatically.
border-start-start-radius
logicalRounds the corner where the 'start' of the block (top) and the 'start' of the inline dimension (left in LTR) meet. This is the logical successor to 'border-top-left-radius'.
border-style
backgroundsA shorthand for setting the line style of all four borders at once. Without a style (like 'solid' or 'dashed'), borders are invisible by default.
border-top
backgroundsA shorthand for setting the width, style, and color of the physical top border in a single declaration.
border-top-color
backgroundsSets the color of the physical top border. Often used to create distinct top-bar accents on cards or containers.
border-top-left-radius
backgroundsDefines the radius curve of the physical top-left corner. While logical alternatives exist, this remains the most common way to round specific corners in CSS.
border-top-right-radius
backgroundsDefines the curve of the physical top-right corner. It can take one or two values to create circular or elliptical curves.
border-top-style
backgroundsSets the line style for the physical top border. You must set a style other than 'none' for the border to be rendered.
border-top-width
backgroundsSpecifies the thickness of the physical top border. It's often used for decorative 'top-border' highlights on layout components.
border-width
backgroundsA shorthand for setting the thickness of all four borders. You can provide 1, 2, 3, or 4 values to target different sides specifically.
bottom
positioningSets the vertical distance between the bottom edge of a positioned element and the bottom edge of its containing block.
box-decoration-break
Controls how an element's fragments (like when a line of text wraps or breaks across pages) are styled. 'Clone' repeats the padding and borders on every fragment, while 'slice' cuts them off.
box-shadow
backgroundsAdds shadow effects around an element's frame. It can be used to create depth, elevation, or subtle glows.
box-sizing
box modelSets how the total width and height of an element is calculated. border-box includes padding and border in the size, while content-box does not.
break-after
Defines what kind of break (page, column, or region) should happen after an element. Commonly used in multi-column layouts or print CSS to force content onto a new page/column.
break-before
Specifies whether a page, column, or region break should occur before an element. Useful for ensuring headers always start a new column or page.
break-inside
Determines if an element should be allowed to split across pages or columns. Setting it to 'avoid' is the standard way to prevent images or cards from getting cut in half.
caption-side
Specifies whether the caption of a table (the <caption> element) should be placed above or below the table content.
caret-animation
An experimental property to control the blinking behavior of the text cursor (caret). Setting it to 'manual' allows you to disable the default blink.
caret-color
Sets the color of the text cursor (caret) in inputs, textareas, or any editable element. This is a great way to maintain brand colors even in form fields.
caret-shape
Determines the visual shape of the text cursor. You can choose between the standard vertical bar, a block, or an underscore (terminal-style).
clear
positioningSpecifies whether an element should be moved below any 'floating' elements that come before it. It's the classic way to 'break' out of a float layout and start fresh on a new line.
clip
A legacy property used to define which portion of an absolutely positioned element is visible. It has been replaced by the more powerful and flexible 'clip-path' property.
clip-path
Creates a clipping region that sets what part of an element should be shown. Parts inside the region are visible, while those outside are hidden.
clip-rule
An SVG-related property that determines how to calculate the 'insideness' of a point in a clipping path. 'Evenodd' is often used for complex shapes with holes.
color-adjust
A legacy property (deprecated in favor of 'print-color-adjust') that tells the browser whether it can override colors to save ink or improve readability when printing.
color-interpolation
An SVG property that determines which color space should be used for gradient interpolations and color animations.
color-interpolation-filters
Specifies the color space for imaging operations performed via filter primitives. It's an internal SVG detail for how colors are calculated during complex filtering.
color-scheme
colorTells the browser which color themes (light, dark) the element can be rendered in. This automatically adjusts UI elements like scrollbars and form controls to match the theme.
column-count
Splits the content of an element into a specified number of columns, similar to a newspaper layout.
column-fill
Controls how content is distributed across columns. 'Balance' tries to make all columns equal in height, while 'auto' fills them one after another until they reach their height limit.
column-gap
flexboxSets the size of the gap (gutter) between columns in multi-column, flex, or grid layouts.
column-height
box modelAn experimental property that allows setting a specific height for columns in a multi-column layout.
column-rule
A shorthand property that sets the width, style, and color of the vertical line (rule) drawn between columns in a multi-column layout.
column-rule-color
Sets the color of the vertical line (rule) drawn between the columns of a multi-column layout.
column-rule-style
Determines the line style (solid, dashed, dotted, etc.) of the vertical line drawn between columns.
column-rule-width
Sets the thickness of the vertical line drawn between columns in a multi-column layout.
column-span
Allows an element (like a header) to stretch across all columns instead of being confined to a single column in a multi-column layout.
column-width
box modelSets the ideal width for columns in a multi-column layout. The browser will create as many columns of at least this width as it can fit in the container.
column-wrap
box modelAn experimental property to control whether content should wrap into new columns or overflow in a multi-column layout.
columns
A shorthand property that allows you to easily create multi-column text layouts, similar to a newspaper or magazine.
contain
Tells the browser that an element and its content are independent of the rest of the page. This allows the browser to optimize rendering because it knows changes inside won't affect anything outside.
contain-intrinsic-block-size
box modelDefines the 'placeholder' block-size (height) of an element when it is subject to size containment (e.g., when off-screen). This prevents layout shifts when content loads or scrolls into view.
contain-intrinsic-height
box modelSets the placeholder height for an element under size containment. It ensures the element occupies space even if its content isn't being rendered yet.
contain-intrinsic-inline-size
box modelDefines the placeholder inline-size (width) of an element when it is under size containment, preventing layout instability.
contain-intrinsic-size
box modelA shorthand property to set both the width and height an element should 'pretend' to have when it is under size containment. This is a game-changer for scroll performance.
contain-intrinsic-width
box modelSets the placeholder width for an element under size containment, helping the browser calculate layout without rendering the full content.
container-name
Assigns a name to a container so that nested elements can style themselves based on that specific container's size or state.
container-type
Defines an element as a 'container' so its children can query its size or state. 'inline-size' is the most common value, allowing responsive styles based on the container's width.
content
Used with the ::before and ::after pseudo-elements to generate content on a page. It can be text, images, or even the value of an attribute.
content-visibility
Allows the browser to skip the rendering work for elements that are currently off-screen. Setting it to 'auto' can drastically improve the initial load speed and scroll performance of long pages.
corner-block-end-shape
backgroundsAn experimental shorthand for styling the shapes (round, angled, etc.) of the corners at the end of the block axis (usually bottom-left and bottom-right).
corner-block-start-shape
backgroundsAn experimental shorthand for styling the shapes of the corners at the start of the block axis (usually top-left and top-right).
corner-bottom-left-shape
backgroundsAn experimental property to define the specific shape of the bottom-left corner. You can choose from 'round', 'angle' (beveled), or other shapes.
corner-bottom-right-shape
backgroundsAn experimental property for the bottom-right corner shape. Part of the new efforts to give designers more control over corner aesthetics beyond simple rounding.
corner-bottom-shape
backgroundsAn experimental shorthand to set the physical shape of both bottom corners simultaneously.
corner-end-end-shape
backgroundsAn experimental property to set the shape of the corner at the end of both the block and inline axes (usually the bottom-right corner in LTR languages).
corner-end-start-shape
backgroundsAn experimental property to set the shape of the corner at the end of the block axis and start of the inline axis (usually the bottom-left corner).
corner-inline-end-shape
backgroundsAn experimental shorthand to set the shape of both corners on the inline-end side of an element (usually the right side).
corner-inline-start-shape
backgroundsAn experimental shorthand to set the shape of both corners on the inline-start side of an element (usually the left side).
corner-left-shape
backgroundsAn experimental physical shorthand to set the shape of both left corners (top-left and bottom-left) simultaneously.
corner-right-shape
backgroundsAn experimental physical shorthand to set the shape of both right corners (top-right and bottom-right) simultaneously.
corner-shape
backgroundsA master shorthand property that allows you to set the shape of all four corners of an element. This is the cornerstone of the new 'CSS Borders 4' features for advanced corner styling.
corner-start-end-shape
backgroundsAn experimental property to set the shape of the corner at the start of the block axis and end of the inline axis (usually the top-right corner).
corner-start-start-shape
backgroundsAn experimental property to set the shape of the corner at the start of both the block and inline axes (usually the top-left corner).
corner-top-left-shape
backgroundsAn experimental property for the top-left corner shape. It gives designers more control, allowing for beveled or angled corners instead of just rounded ones.
corner-top-right-shape
backgroundsAn experimental property for the top-right corner shape. Part of the new efforts to provide advanced border styling in CSS.
corner-top-shape
backgroundsAn experimental shorthand to set the physical shape of both top corners (top-left and top-right) at once.
counter-increment
Advances a CSS counter by a specified value (default is 1). It's commonly used to number items like chapters, sections, or images in complex documents.
counter-reset
Resets a CSS counter to a specific value (default is 0). It's typically used on a parent element to start a new sequence for its children.
counter-set
Sets a CSS counter to a specified value. Unlike 'counter-reset', which starts a new scope, 'counter-set' modifies the value of an existing counter within the current scope.
cursor
Sets the mouse cursor to show when the mouse pointer is over an element. Common values include pointer for links, wait for loading states, and help.
custom-property
Commonly known as 'CSS Variables'. They allow you to store values (like colors or sizes) in a name starting with '--' and reuse them throughout your stylesheet using the 'var()' function.
cx
Defines the x-coordinate of the center of an SVG element, like a <circle> or <ellipse>. You can now control this directly via CSS properties.
cy
Defines the y-coordinate of the center of an SVG element, like a <circle> or <ellipse>. This works similarly to 'cx' but for the vertical axis.
d
A CSS property that allows you to define the shape of an SVG <path> element. This is powerful for animating paths or changing them purely with CSS (e.g., on hover).
direction
typographySpecifies the base text direction for an element. 'ltr' is for languages like English, and 'rtl' is for languages like Arabic or Hebrew.
display
layoutDefines the internal and external display types of an element. It determines if an element behaves like a block or inline box and how its children are laid out.
dominant-baseline
An SVG property that determines which baseline is used to align text. It's crucial for vertical alignment of text and icons within SVG graphics.
dynamic-range-limit
colorA cutting-edge property that allows you to limit the maximum brightness of colors on HDR (High Dynamic Range) displays. This is useful for preventing eye strain when bright white elements are displayed on HDR screens.
empty-cells
A table property that determines if borders and backgrounds should be shown for cells that have no visible content.
field-sizing
A modern property that allows form fields (like textareas) to automatically grow or shrink based on the amount of text typed into them, without needing JavaScript.
fill
Sets the color or pattern used to paint the inside of an SVG shape. It is the SVG equivalent of the 'background-color' property for regular HTML elements.
fill-opacity
An SVG property that controls the transparency of the inner fill of a shape or text. A value of 0 is fully transparent, and 1 is fully opaque.
fill-rule
An SVG property that determines how the interior of a complex shape (with overlapping paths) is filled with color.
filter
Applies graphical effects like blur, brightness, or color shifts to an element, similar to image editing software effects.
flex-basis
flexboxDefines the initial size of a flex item before the container distributes any remaining space. It works like width or height depending on the flex-direction.
flex-direction
flexboxDetermines the orientation of flex items in a container, essentially choosing whether they form a horizontal row or a vertical column.
flex-flow
flexboxA shorthand property that combines 'flex-direction' and 'flex-wrap'. It lets you set the direction of items and whether they should wrap in one line of code.
flex-grow
flexboxDefines the ability for a flex item to grow if necessary. It accepts a unitless value that serves as a proportion; it dictates how much of the available space inside the flex container the item should take up.
flex-shrink
flexboxDefines the ability for a flex item to shrink if necessary. It works as a proportion; if the container is too small, items with a higher shrink value will shrink more to fit.
flex-wrap
flexboxAllows flex items to spill over into multiple lines when they run out of room, rather than squishing together on a single line.
float
positioningAn older layout property that pushes an element to the left or right, allowing text and other content to wrap around it. Often used for images within articles.
flood-color
An SVG property that sets the color of an SVG filter's flood area. It's often used with 'feFlood' to fill a region with a solid color for lighting or shadow effects.
flood-opacity
An SVG property that sets the transparency level of an SVG filter's flood color. 0 is invisible, 1 is fully solid.
flow-tolerance
An experimental property related to how text flows and its tolerance for line-breaking or overflows, currently mostly seen in Safari/WebKit.
font
typographyA powerful shorthand property that lets you set many text-related properties (like size, weight, and family) all in one go. It's the most efficient way to define the overall look of your text.
font-family
Specifies a prioritized list of one or more font family names and/or generic family names for the selected element.
font-feature-settings
typographyA low-level property that gives you control over OpenType font features like ligatures, kerning, and advanced typographic alternates.
font-kerning
typographyControls how the spacing between specific pairs of letters is adjusted (e.g., pulling 'A' and 'V' closer together) to make text look more balanced.
font-language-override
typographyA specialized property that forces a font to use typographic rules for a specific language, regardless of what the document's actual language is set to.
font-optical-sizing
typographyFor variable fonts, this property automatically adjusts the shape of letters to be more readable at small sizes or more elegant at large sizes.
font-palette
typographyAllows you to select a specific color palette for a color font (font that has multiple colors built-in), often used for icon fonts or emojis.
font-size
typographySets the size of the font. This is one of the most fundamental properties for defining the visual scale of text on a page.
font-size-adjust
typographyEnsures that if your primary font fails to load, the fallback font is automatically resized to match the same visual height (x-height), preventing the layout from jumping or text becoming unreadable.
font-stretch
typographyAllows you to choose a wider or narrower version of a font if the font family supports it (commonly used with variable fonts to squeeze or stretch text).
font-style
typographySets whether text should be rendered in an upright (normal), slanted (italic), or skewed (oblique) style.
font-synthesis
typographyA shorthand property that controls whether the browser can 'fake' bold, italic, or small-caps styles if the font doesn't provide them.
font-synthesis-position
typographyControls whether the browser is allowed to 'fake' subscript or superscript positions if the font doesn't have them built-in.
font-synthesis-small-caps
typographyControls whether the browser is allowed to 'fake' small-caps by shrinking capital letters if the font doesn't have a real small-caps version.
font-synthesis-style
typographyControls whether the browser is allowed to 'fake' an italic style by slanting the text if a real italic font file isn't available.
font-synthesis-weight
typographyControls whether the browser is allowed to 'fake' a bold look by thickening the strokes if a real bold font file isn't available.
font-variant
typographyA shorthand property that lets you control advanced typographic features like small caps, old-style numerals, and special ligatures. It helps you make text look more professional and polished if the font supports it.
font-variant-alternates
typographyA property that lets you toggle stylistic alternates in a font (like different ways to draw the letter 'g' or 'a') if the font has multiple versions of those characters.
font-variant-caps
typographyAllows you to use special 'all-caps' or 'small-caps' styles built into a font. Smaller caps are often used to make acronyms look more harmonious with lowercase text.
font-variant-east-asian
typographyA property that controls specialized typographic features for East Asian writing systems, like Japanese and Chinese (e.g., Ruby characters).
font-variant-emoji
typographyEnables you to force a character to look like a colorful emoji or a simple black-and-white text symbol, assuming the font supports both.
font-variant-ligatures
typographyControls 'ligatures'—where two or more characters are merged into a single decorative shape (like 'fi' or 'fl' touching).
font-variant-numeric
typographyControls how numbers are displayed. You can use it to create 'old-style' numbers, slashed zeros (to distinguish 0 from O), or fractions.
font-variant-position
typographyA property that lets you use real, typographically correct subscript and superscript characters built into a font, rather than having the browser 'fake' them with small offsets.
font-variation-settings
typographyA low-level property used for controlling 'variable fonts'. It allows you to fine-tune axes like weight, width, slant, or custom axes with unprecedented precision.
font-weight
typographySets the thickness or boldness of the font. Values can be keywords like 'bold' or numbers (e.g., 400 for regular, 700 for bold).
font-width
typographyA modern property (mostly in Safari/WebKit) that specifically controls the width axis of a variable font, similar to 'font-stretch' but with a more direct name.
forced-color-adjust
colorControls whether the browser is allowed to override an element's colors (like when 'High Contrast Mode' is active on Windows). It's handy for preserving specific brand colors that might otherwise be hidden.
gap
flexboxSets the distance between rows and columns in grid, flex, or multi-column layouts. It is a shorthand for row-gap and column-gap.
glyph-orientation-vertical
A deprecated property used in SVG to control the orientation of characters when text is written vertically. Use 'text-orientation' in modern CSS instead.
grid
gridA shorthand property for setting all the explicit and implicit grid properties in a single declaration. It allows you to define rows, columns, and templates quickly.
grid-area
gridA shorthand property that lets you assign an element to a specific named area or set of lines within a CSS Grid, defining its position and size in one line.
grid-auto-columns
gridSets the size of any columns that the browser creates automatically (implicit columns) when you place items outside of your explicitly defined grid columns.
grid-auto-flow
gridDetermines the algorithm used to automatically place grid items that aren't specifically positioned. It can fill row by row, column by column, or try to fill gaps 'densely'.
grid-auto-rows
gridSets the size of any rows that the browser creates automatically (implicit rows) when items spill over your explicitly defined grid rows.
grid-column
gridA shorthand property for grid-column-start and grid-column-end. It defines an item's horizontal position and width within a grid in a single line.
grid-column-end
gridDefines which vertical grid line a grid item should end at. You can specify a line number, a named line, or use 'span' to say how many columns it should cover.
grid-column-start
gridDefines which vertical grid line a grid item should begin at. You can specify a line number or a named line.
grid-row
gridA shorthand property for grid-row-start and grid-row-end. It defines an item's vertical position and height within a grid in one line.
grid-row-end
gridDefines which horizontal grid line a grid item should end at. You can use line numbers, names, or 'span' keywords.
grid-row-start
gridDefines which horizontal grid line a grid item should begin at. You can specify a line number or a named line.
grid-template
gridA powerhouse shorthand that lets you define 'grid-template-rows', 'grid-template-columns', and 'grid-template-areas' all at once. Perfect for defining a full page layout in one property.
grid-template-areas
gridAllows you to design a grid layout using 'named areas'. You can draw a visual map of your page using strings, making complex layouts much easier to read.
grid-template-columns
gridDefines the number and widths of columns in a grid. You can set fixed sizes, percentages, or use the fr unit to fill available space.
grid-template-rows
gridDefines the height of each row in a grid. You can set fixed heights, use percentages, or the 'fr' unit to fill available vertical space.
hanging-punctuation
typographyAllows punctuation marks (like quotation marks or hyphens) to be placed outside the text box alignment, making the edges of a paragraph look cleaner and straighter.
height
box modelSets the height of an element. It defines the vertical space an element occupies.
hyphenate-character
typographySets the character used when a word is broken at the end of a line. While usually a hyphen (-), you can change it to something else (like an arrow or a different symbol).
hyphenate-limit-chars
typographySets rules for how and when a word should be hyphenated, such as the minimum word length or the minimum number of characters left at the start or end of a line.
hyphens
typographyControls whether the browser is allowed to automatically break words with hyphens to prevent large gaps in text alignment.
image-orientation
imagesControls whether an image is automatically rotated based on its 'EXIF' metadata (data captured by cameras about how the photo was taken).
image-rendering
imagesDetermines how the browser should upscale or downscale an image. It's especially useful for making pixel art look sharp ('pixelated') rather than blurry when enlarged.
ime-mode
An old, mostly deprecated property used to control the 'Input Method Editor' (like character pickers for non-English languages). It's rarely used today and not supported in Chrome or Safari.
initial-letter
A modern way to create 'drop caps' (large first letters at the start of a paragraph). You can specify how many lines high the letter should be and how many lines it should sink into the text.
inline-size
logicalA logical property that sets the 'width' of an element relative to the direction of text. In horizontal languages (like English), it's exactly the same as 'width'.
inset
logicalA modern shorthand property that sets the distance between an element and its parent container. It's much faster than writing out 'top', 'right', 'bottom', and 'left' separately.
inset-block
logicalA logical shorthand for 'inset-block-start' and 'inset-block-end'. It defines an element's distance from the top and bottom of its container in one line.
inset-block-end
logicalA logical property that sets the distance from the 'end' of the block axis (usually the 'bottom' in English layouts). It's the logical replacement for 'bottom'.
inset-block-start
logicalA logical property that sets the distance from the 'start' of the block axis (usually the 'top' in English layouts). It's the logical replacement for 'top'.
inset-inline
logicalinset-inline-end
logicalA logical property that sets the distance from the 'end' of the inline axis (usually the 'right' in LTR or 'left' in RTL). It's the logical replacement for 'right'.
inset-inline-start
logicalA logical property that sets the distance from the 'start' of the inline axis (usually the 'left' in LTR or 'right' in RTL). It's the logical replacement for 'left'.
interactivity
An experimental property that can make an entire section of a page 'inert' (unclickable and ignored by assistive technology), similar to the 'inert' HTML attribute but via CSS.
interest-delay
Experimental shorthand for 'interest-delay-start' and 'interest-delay-end'. Controls the timing for appearing and disappearing 'interest' UI elements like tooltips.
interest-delay-end
Experimental: Part of the Interest API. Sets the delay before an 'interest' state (like a tooltip or hover-card) is dismissed after the user stops showing interest.
interest-delay-start
Experimental: Part of the Interest API. Sets the delay before an 'interest' state (like a tooltip or popover) appears after the user starts showing interest (e.g., hovering).
interpolate-size
valuesA game-changer for CSS transitions. It allows you to animate an element's size to or from keywords like 'auto', 'min-content', or 'max-content' smoothly.
isolation
Defines whether an element must create a new stacking context. This is useful for preventing mix-blend-mode or z-index from affecting elements outside of a specific container.
justify-content
flexboxDefines how the browser distributes space between and around content items along the main axis of a flex container or the inline axis of a grid container.
justify-items
flexboxDefines the default alignment for all items inside a grid container along the inline (horizontal) axis.
justify-self
flexboxAllows a single item inside a grid or flex container to override the default alignment set by its parent.
letter-spacing
typographySets the horizontal spacing (kerning) between characters in a block of text.
lighting-color
Specifies the color of the light source used in SVG filter primitives like <feDiffuseLighting> and <feSpecularLighting>.
line-break
typographyControls how strictly the browser should apply line-breaking rules, especially for CJK (Chinese, Japanese, Korean) languages where certain characters shouldn't start or end a line.
line-clamp
Limits the number of lines displayed in a block of text, automatically adding an ellipsis (...) at the end. It's the modern, non-prefixed way to do 'multiline truncation'.
line-height
Sets the height of a line box. It is commonly used to set the distance between lines of text, which significantly affects readability.
list-style
A shorthand property for setting all the list style properties at once. It's most commonly used to remove bullets entirely.
list-style-image
Allows you to use an image (like a tiny icon or logo) as the bullet point for list items.
list-style-position
Determines whether the list bullet appears inside or outside the text block. 'inside' makes the bullet part of the first line of text, while 'outside' keeps it in the margin.
list-style-type
Sets the marker (bullet or number) for a list item element. You can choose from built-in shapes, numbers, or even custom strings.
margin
box modelSets the margin area on all four sides of an element. It creates space between an element and its neighbors.
margin-block
logicalA logical shorthand for 'margin-block-start' and 'margin-block-end'. It sets the vertical spacing (top and bottom) in one line.
margin-block-end
logicalA logical property that sets the margin at the 'end' of the block axis (usually the 'bottom' in English). It's the logical replacement for 'margin-bottom'.
margin-block-start
logicalA logical property that sets the margin at the 'start' of the block axis (usually the 'top' in English). It's the logical replacement for 'margin-top'.
margin-bottom
box modelSets the amount of empty space below an element. This space pushes other elements further down the page.
margin-inline
logicalA logical shorthand for 'margin-inline-start' and 'margin-inline-end'. It sets the horizontal spacing (left and right) in one line.
margin-inline-end
logicalA logical property that sets the margin at the 'end' of the inline axis (usually the 'right' in LTR or 'left' in RTL). It's the logical replacement for 'margin-right'.
margin-inline-start
logicalA logical property that sets the margin at the 'start' of the inline axis (usually the 'left' in LTR or 'right' in RTL). It's the logical replacement for 'margin-left'.
margin-left
box modelSets the amount of empty space on the left side of an element. This can be used to push the element away from its neighbor on the left.
margin-right
box modelSets the amount of empty space on the right side of an element. This creates a gap between the element and whatever is to its right.
margin-top
box modelSets the amount of empty space above an element. This pushes the element further down the page from its top neighbor.
margin-trim
box modelAn experimental property that 'trims' the margins of child elements when they hit the edges of their container. It's a cleaner way to handle things like the last item's margin-bottom.
marker-end
An SVG property that places a 'marker' (like an arrowhead or dot) at the very last point of a path, line, or polyline.
marker-mid
Defines the symbol or marker that will be displayed at every vertex (point) of an SVG path, except for the very first and very last points. It's perfect for adding arrowheads or dots to a multi-segment line.
marker-start
Defines the symbol or marker that will be displayed at the very first point of an SVG path. It's commonly used to add arrowheads to the start of a line.
mask
A shorthand property that allows you to hide or partially hide parts of an element using an image or a gradient. It's like using a stencil to cut a shape out of an element.
mask-border
A shorthand property that lets you use an image as a 'border mask' for an element. This allows you to create decorative borders that are defined by an external image file.
mask-border-outset
Defines how much the mask border area extends beyond the element's border box, effectively pushing the mask outwards.
mask-border-repeat
Determines how the edges and corners of the mask border image are repeated or stretched to fill the mask area.
mask-border-slice
Specifies how to 'slice' the mask border image into nine regions (four corners, four edges, and a center). This allows the edges to scale while keeping the corners fixed.
mask-border-source
Sets the image that will be used to create the mask border. This image is sliced and applied to the border area of an element.
mask-border-width
Sets the thickness of the mask border. If this is different from the element's actual border width, the mask border will scale to fit.
mask-clip
Determines which area of the element (border, padding, or content box) the mask should actually apply to. It works similarly to 'background-clip'.
mask-composite
Defines how multiple mask layers should be combined together (e.g., should they be added, subtracted, or intersected).
mask-image
Sets the image that will be used as the masking layer for an element. It allows you to selectively hide parts of an element using gradients or transparent images.
mask-mode
Specifies whether the mask should be treated as an alpha mask (using transparency) or a luminance mask (using brightness).
mask-origin
Defines the 'origin' or starting point of the mask position. It determines where the mask image is placed relative to the element's boxes.
mask-position
Sets the initial position of the mask image within the masking area. It works exactly like 'background-position'.
mask-repeat
Controls whether the mask image is tiled (repeated) across the element, and how it is tiled. It works exactly like 'background-repeat'.
mask-size
Sets the size of the mask image. You can use keywords like 'cover' or 'contain', or specific pixel/percentage values, just like 'background-size'.
mask-type
An SVG property (also available in CSS) that determines whether an SVG <mask> element should be treated as an alpha mask or a luminance mask.
math-depth
Controls how MathML formulas are scaled when nested. Increasing the depth usually makes the text smaller, similar to how subscripts or superscripts work.
math-shift
A property for MathML that determines whether superscripts should be shifted upwards more aggressively ('normal') or kept closer to the baseline ('compact').
math-style
Specifies whether MathML equations should be rendered in a 'display' style (centered and full-sized) or an 'inline' style (more compact to fit inside a paragraph).
max-block-size
logicalA logical property that sets the maximum size of an element in the block axis (usually 'height'). It's the logical replacement for 'max-height'.
max-height
box modelSets the maximum height of an element. It prevents the element from becoming taller than the specified value. If the content is taller, it will overflow based on the overflow property.
max-inline-size
logicalA logical property that sets the maximum size of an element in the inline axis (usually 'width'). It's the logical replacement for 'max-width'.
max-width
box modelSets the maximum width of an element. It prevents the element from becoming wider than the specified value, even if the content or container is larger.
min-block-size
logicalA logical property that sets the minimum size of an element in the block axis (usually 'height'). It's the logical replacement for 'min-height'.
min-height
box modelSets the minimum height of an element. It prevents the element from becoming shorter than the specified value, which is useful for ensuring a section always has some height even if it's empty.
min-inline-size
logicalA logical property that sets the minimum size of an element in the inline axis (usually 'width'). It's the logical replacement for 'min-width'.
min-width
box modelSets the minimum width of an element. It prevents the element from becoming narrower than the specified value, even if the content or container is smaller.
mix-blend-mode
Sets how an element's content should blend with the content of the element's direct background (parent).
object-fit
imagesDefines how an <img> or <video> should be resized to fit its container. cover is perfect for making images fill a space without being squashed.
object-position
imagesSets the alignment of an image or video within its container when using object-fit. It's like background-position but for replaced elements like <img> and <video>.
object-view-box
imagesAllows you to specify a 'view box' for an image or video, similar to how viewBox works in SVG. This essentially lets you crop or zoom into a specific part of a replaced element using CSS.
offset
animationsA shorthand property for setting all the individual motion path properties (path, distance, rotation, etc.) in a single line.
offset-anchor
animationsDefines the point of the element that is actually 'attached' to the motion path. By default, it's the center, but you can change it to a corner or specific position.
offset-distance
animationsSpecifies how far along a motion path (defined by offset-path) an element should be placed. It's usually animated from 0% to 100%.
offset-path
animationsDefines the actual path an element should follow during a motion animation. You can use SVG path strings, shapes (like circles), or даже browser curves.
offset-position
animationsSets the initial starting position of a motion path. It determines where the 'zero point' of the path is located relative to the element's container.
offset-rotate
animationsControls the rotation of an element as it moves along a path. By default, 'auto' makes the element 'face' the direction it's moving.
opacity
colorSets the transparency level of an element. A value of 0 is fully transparent, while 1 is fully opaque.
order
layoutChanges the visual order of items within a flex or grid container without changing their actual order in the HTML code.
orphans
Specifies the minimum number of lines of a paragraph that must be left at the bottom of a page or column before a break.
outline
A shorthand property for setting the width, style, and color of an element's outline. Outlines are drawn outside the border edge and don't take up space.
outline-color
Sets the color of the outline drawn around an element. Outlines are different from borders because they don't take up any space in the layout.
outline-offset
Adds space between the edge of the element and the outline. Positive values push the outline away, negative values pull it inside.
outline-style
Sets the style of the outline (like 'solid', 'dashed', or 'dotted'). It works exactly like 'border-style'.
outline-width
Sets the thickness of the outline around an element. It works exactly like 'border-width'.
overflow-anchor
A browser optimization that helps keep your scroll position steady when content is added to the page above where you're looking. It prevents the page from 'jumping' unexpectedly.
overflow-block
A logical property that sets the overflow behavior in the block direction (usually vertical). It's the logical replacement for 'overflow-y'.
overflow-clip-margin
Works with 'overflow: clip' to allow content to extend slightly beyond the element's box before it is cut off. It's like a 'safe zone' for clipped content.
overflow-inline
A logical property that sets the overflow behavior in the inline direction (usually horizontal). It's the logical replacement for 'overflow-x'.
overflow-wrap
typographyTells the browser whether it is allowed to break a very long word (like an ID or URL) onto a new line if it would otherwise overflow its container.
overflow-x
Controls what happens to content that is wider than its container. It can be hidden, clipped, or made to scroll horizontally.
overflow-y
Controls what happens to content that is taller than its container. This is the most common way to add a vertical scrollbar to a box.
overlay
positioningA property used for elements in the 'top layer' (like <dialog> or popovers). It specifies whether an element should be rendered in the top layer even when it's not the active modal.
overscroll-behavior
A shorthand for setting how the browser handles reaching the boundary of a scroll area in both directions. It helps stop annoying 'scroll chaining'.
overscroll-behavior-block
A logical property that controls what happens when you reach the end of a scroll area in the block (vertical) direction. It prevents 'scroll chaining' to the parent container.
overscroll-behavior-inline
A logical property that controls what happens when you reach the end of a scroll area in the inline (horizontal) direction. It prevents 'scroll chaining' to the parent container.
overscroll-behavior-x
Controls what happens when you reach the end of a horizontal scroll zone. It's often used to keep users from accidentally navigating 'back' or 'forward' with swipe gestures.
overscroll-behavior-y
Controls what happens when you reach the end of a vertical scroll zone. This is the most common way to stop the background page from scrolling when a popup or menu is open.
padding
box modelSets the padding area on all four sides of an element. It creates space between an element's content and its border.
padding-block
logicalA logical shorthand for setting both 'padding-block-start' and 'padding-block-end'. It's like setting 'padding-top' and 'padding-bottom' at the same time.
padding-block-end
logicalA logical property that sets the padding at the end of the block axis. For normal horizontal text, this is the same as 'padding-bottom'.
padding-block-start
logicalA logical property that sets the padding at the start of the block axis. For normal horizontal text, this is the same as 'padding-top'.
padding-bottom
box modelSets the amount of internal space between the bottom edge of an element and its content.
padding-inline
logicalA logical shorthand for setting both 'padding-inline-start' and 'padding-inline-end'. It's like setting 'padding-left' and 'padding-right' at the same time.
padding-inline-end
logicalA logical property that sets the padding at the end of the inline axis. For left-to-right text, this is 'padding-right'.
padding-inline-start
logicalA logical property that sets the padding at the start of the inline axis. For left-to-right text, this is 'padding-left'.
padding-left
box modelSets the amount of internal space between the left edge of an element and its content.
padding-right
box modelSets the amount of internal space between the right edge of an element and its content.
padding-top
box modelSets the amount of internal space between the top edge of an element and its content.
page-break-after
A legacy property used to control page breaks when printing. It's used to force or prevent a new page from starting after an element.
page-break-before
A legacy property used to control page breaks when printing. It's used to force or prevent a new page from starting before an element.
page-break-inside
A legacy property used to prevent a page break from occurring inside an element when printing (for example, to keep an image and its caption on the same page).
paint-order
An SVG-related property that controls whether an element's fill or stroke is drawn first. This is useful for preventing a thick stroke from obscuring the fill of a shape or text.
perspective
transformsGives an element a 3D feel by setting the distance between the viewer and the 'z=0' plane. A smaller number creates a more intense 3D effect.
perspective-origin
transformsSets the 'vanishing point' for a 3D transformation. It determines the position from which the viewer is looking at the 3D space.
place-content
flexboxA shorthand for setting both 'align-content' and 'justify-content' at once. It controls how the alignment of the entire content block (not individual items) happens within its container.
place-items
flexboxA shorthand for setting both align-items and justify-items in a single property. It's incredibly useful for quick centering in CSS Grid.
place-self
flexboxA shorthand for setting both 'align-self' and 'justify-self' on a single item. It lets one specific item in a Flex or Grid container override the default alignment of the group.
pointer-events
Specifies under what circumstances (if any) a particular graphic element can become the target of pointer events (like clicks or hovers).
position-anchor
Specifies which defined anchor element a positioned element should track. It connects the positioned element to its anchor by name.
position-area
A newer, simplified way to position an element relative to its anchor. Instead of manually calculating top/left, you can use logical regions like 'top-right' or 'bottom-center'.
position-try-fallbacks
Part of the Anchor Positioning API, this property lets you define a list of 'backup' positions for an element. If the primary position would cause the element to overflow its container, the browser will try these fallbacks instead.
position-try-order
Determines the order in which the browser tries the fallback positions defined in 'position-try-fallbacks'. You can tell the browser to prioritize the position with the most available space.
position-visibility
Controls when an anchor-positioned element should be shown or hidden based on the visibility of its anchor. For example, you can hide a tooltip if its anchor is scrolled out of view.
print-color-adjust
colorA hint to the browser's print engine. It specifies whether the browser should use economical colors (to save ink) or force the printout to match the exact colors/backgrounds shown on screen.
quotes
Specifies which characters to use for curly quotes or other language-specific quotation marks when using the <q> tag or 'content: open-quote'.
r
Sets the radius of an SVG <circle> element. This property allows you to control the size of circles directly from your CSS, which is great for hover effects or animations.
reading-flow
layoutA powerful new property that fixes a common accessibility issue: when you reorder items visually (using Flexbox or Grid 'order'), screen readers still read them in their original code order. This property tells the browser to follow the visual layout instead.
reading-order
layoutA companion to 'reading-flow'. It allows you to manually specify the order in which a screen reader or keyboard navigation should move through elements, regardless of their position in the HTML source.
resize
Sets whether an element is resizable by the user, and if so, in which directions. Note that this only works on elements where overflow is not 'visible'.
rotate
transformsAn individual transform property that rotates an element around a fixed point (the transform-origin) without needing the shorthand transform property.
row-gap
flexboxSets the size of the gap (gutter) between rows in a Grid, Flexbox, or Multi-column layout.
ruby-align
A property used in East Asian typography to align 'ruby' annotations (the tiny pronunciation guides above characters). It works like 'justify-content' but specifically for ruby text.
ruby-overhang
Specifies whether a ruby annotation (pronunciation guide) can 'hang over' onto adjacent characters if it is wider than the character it's attached to.
ruby-position
Controls where a ruby annotation is placed relative to its character (usually either 'over' or 'under').
rx
Sets the horizontal radius of an SVG <ellipse> or the corner rounding radius of a <rect>. It allows you to create rounded rectangles directly from CSS.
ry
Sets the vertical radius of an SVG <ellipse> or the corner rounding radius of a <rect>. It works just like 'rx' but for the vertical axis.
scale
transformsAn individual transform property that resizes an element, making it larger or smaller without needing the shorthand transform property.
scroll-behavior
Sets the behavior for a scrolling box when scrolling is triggered by navigation or CSSom scrolling APIs. smooth creates a nice transition instead of an instant jump.
scroll-initial-target
A property that tells the browser to automatically 'snap' to a specific element when the page first loads or when a container first appears.
scroll-margin
Defines the margin (offset) of an element when it is scrolled into view via scroll-snapping or anchor links. This is extremely useful for preventing fixed headers from covering the top of a section.
scroll-margin-block
A shorthand that sets both the start and end scroll margins at the same time. It creates a 'snap buffer' in the vertical direction (or whatever the 'block' axis is).
scroll-margin-block-end
Sets the margin between the end of an element and the edge of its scroll container specifically for 'scroll snapping'. This ensures that when an element snaps into view, it doesn't bump directly against the edge.
scroll-margin-block-start
Sets the 'snap margin' at the start of an element. This is perfect for ensuring that when you scroll to a section, your 'sticky' header doesn't cover up the section's' title.
scroll-margin-bottom
Forces a specific amount of empty space at the bottom of an element when it's being snapped into place by the browser.
scroll-margin-inline
A shorthand that sets both the start and end scroll margins in the horizontal (inline) direction at once.
scroll-margin-inline-end
Sets the snap margin at the 'end' of an element in the text flow (usually the right side in English). It ensures a gap between the element and the edge of the scroll container when it snaps.
scroll-margin-inline-start
Sets the snap margin at the 'start' of an element in the text flow (usually the left side in English). This is great for horizontal carousels to keep the current item from hugging the left edge.
scroll-margin-left
Forces a specific amount of empty space on the left side of an element when it's snapped into place by the browser.
scroll-margin-right
Forces a specific amount of empty space on the right side of an element when it's snapped into place by the browser.
scroll-margin-top
Forces a specific amount of empty space at the top of an element when it's snapped into place. Extremely common for preventing sticky headers from overlapping your anchor targets.
scroll-padding
Sets the padding (inner offset) of a scroll container. It ensures that when elements snap or are scrolled into view, they stay a certain distance away from the edges of the container.
scroll-padding-block
scroll-padding-block-end
Sets the padding at the end of the scroll container's 'snapping area'. While 'scroll-margin' is set on the items, 'scroll-padding' is set on the container itself.
scroll-padding-block-start
Sets the padding at the start of the scroll container's 'snapping area'. It's applied to the SCROLL CONTAINER and affects how ALL items inside it are positioned when snapped.
scroll-padding-bottom
Sets the snap padding at the bottom of the scroll container. It essentially creates a 'safe zone' at the bottom of the scroller so that snapped items don't hit the very edge.
scroll-padding-inline
A shorthand that sets both the start and end scroll padding in the horizontal (inline) direction on a container.
scroll-padding-inline-end
Sets the snap padding at the 'end' of the scroll container in the text flow (usually the right side). Applied to the container, it affects where all items inside will snap.
scroll-padding-inline-start
Sets the snap padding at the 'start' of the scroll container in the text flow (usually the left side). Keeps snapped items from hugging the left edge.
scroll-padding-left
Sets a fixed amount of padding on the left side of a scroll container that specifically interacts with scroll snapping.
scroll-padding-right
Sets a fixed amount of padding on the right side of a scroll container that specifically interacts with scroll snapping.
scroll-padding-top
Sets a fixed amount of padding on the top of a scroll container that specifically interacts with scroll snapping. Often applied to the root element to account for sticky headers.
scroll-snap-align
Used on children within a scroll-snap container to define which part of the element should snap to the container. You can snap to the start, center, or end of the element.
scroll-snap-stop
Determines whether a scroll container is allowed to 'skip' snap points when the user is scrolling quickly. Setting it to 'always' forces the scroll to stop at every single item.
scroll-snap-type
Enables scroll snapping on a container, forcing the scroll position to 'snap' to certain elements. It converts a smooth scroll into a stepped, slider-like experience.
scroll-target-group
A new property that allows you to group multiple targets in a scroll container together. This helps the browser decide which element should be 'snapped' to when there are multiple potential choices.
scroll-timeline
animationsLinks an animation's progress directly to the scroll position of a scroll container. This replaces time-based durations with scroll-based progress.
scroll-timeline-axis
animationsDefines the axis of a scroll container that will drive the progress of a scroll timeline — either block (vertical) or inline (horizontal).
scroll-timeline-name
animationsAssigns a custom name to a scroll timeline, allowing it to be referenced by the animation-timeline property on other elements.
scrollbar-color
A modern, standard way to change the colors of a scrollbar's 'thumb' (the moving part) and 'track' (the background). It's much simpler than the old webkit pseudo-elements.
scrollbar-gutter
scrollbar-width
shape-image-threshold
Used with 'shape-outside', this property defines the alpha (transparency) limit that determines the shape. A threshold of 0.5 means pixels with more than 50% opacity will form part of the shape.
shape-margin
Sets a margin for a shape created with 'shape-outside'. It adds a buffer of empty space between the custom shape and the text wrapping around it.
shape-outside
The core property for CSS Shapes. It allows text to wrap around complex paths (like circles, polygons, or transparent images) instead of just being limited to rectangular boxes.
shape-rendering
An SVG-specific property that tells the browser how to render shapes. You can prioritize speed over quality, or ensure that lines and edges look perfectly crisp on modern screens.
speak
A basic speech property that determines if an element should be read aloud at all by speech-enabled browsers or screen readers.
speak-as
Controls how a screen reader or speech synthesizer should pronounce certain content. For example, it can force the browser to 'spell out' every letter or read out punctuation marks.
stop-color
Defines the color used at a specific 'stop' in an SVG gradient. It's applied to the <stop> element inside a <linearGradient> or <radialGradient>.
stop-opacity
Defines the transparency (alpha) of a color stop in an SVG gradient. This allows you to create gradients that fade into transparency.
stroke
stroke-color
An experimental property (mainly supported in Safari) that allows you to set the color of an SVG path or text stroke using standard CSS color values.
stroke-dasharray
Creates dashed or dotted lines for SVG shapes. You provide a list of numbers that define the length of the dashes and the spaces between them.
stroke-dashoffset
Defines where a dash pattern (created with 'stroke-dasharray') starts. By animating this value, you can create the 'self-drawing' line effect commonly seen in SVG animations.
stroke-linecap
Defines the shape of the ends of an SVG path. You can make them blunt (butt), rounded (round), or extended (square).
stroke-linejoin
Defines how the corners of an SVG path or shape should look when two lines meet. Options include sharp (miter), rounded (round), or flattened (bevel).
stroke-miterlimit
Works with 'stroke-linejoin: miter' to determine when the sharp points of a corner should be 'clipped' or flattened. If the point gets too long (beyond this limit), it automatically turns into a bevel join.
stroke-opacity
Defines the transparency (alpha) of the border (stroke) of an SVG shape or text. A value of 0 is fully transparent, and 1 is fully opaque.
stroke-width
Sets the thickness of the border (stroke) on SVG shapes or text. It can be defined in pixels, percentages, or other standard CSS units.
tab-size
typographyDetermines the width of tab characters ( ) in your text. This is extremely useful for styling code blocks or pre-formatted text where you want consistent indentation.
table-layout
Controls the algorithm used to lay out table cells, rows, and columns. 'Fixed' allows for faster rendering and consistent column widths based on the table's width.
text-align
typographySets the horizontal alignment of inline-level content inside a block container. It can align text to the left, right, center, or justify it.
text-align-last
typographyDetermines how the very last line of a block or a line right before a forced line break should be aligned. This is often used to ensure the last line of a justified paragraph is centered or left-aligned.
text-anchor
An SVG-specific property used to align a string of text relative to its starting point. It's essentially 'text-align' but for text elements inside an <svg>.
text-autospace
typographyA new property that automatically adds small amounts of spacing between different types of characters (like between ideographs and non-ideographs in mixed-language text) to improve readability.
text-box
The shorthand property for 'text-box-trim' and 'text-box-edge'. It provides a concise way to control how a text box's vertical space is calculated and trimmed.
text-box-edge
Works with 'text-box-trim' to define which metric (like the 'cap height' or 'alphabetic' baseline) should be used as the boundary when trimming the space around a block of text.
text-box-trim
A highly anticipated property that allows you to 'trim' the leading (built-in vertical space) from the top and bottom of a text block. This solves the long-standing problem of text not being perfectly centered vertically in buttons or containers.
text-combine-upright
typographyUsed in vertical writing modes (like Japanese or Chinese) to 'group' short characters (like numbers or acronyms) together so they appear horizontally (upright) instead of stacked vertically.
text-decoration
typographyA shorthand property that sets the appearance of decorative lines on text, such as underlines, overlines, and strike-throughs.
text-decoration-color
typographySets the color of the lines defined by 'text-decoration-line' (like underlines, overlines, or strike-throughs).
text-decoration-inset
typographyAn experimental property that allows you to adjust the position of an underline or overline, pushing it closer to or further away from the text baseline.
text-decoration-line
typographySets which type of decorative line should be added to the text. You can add more than one line at once (like an underline and an overline).
text-decoration-skip
typographyA broader property that defines which parts of an element's content should be skipped by its text decorations. For example, you can tell an underline to skip spaces or the edges of the box.
text-decoration-skip-ink
typographyControls how underlines are drawn when they cross the 'descenders' of characters (like the tails on 'g', 'j', or 'p'). Setting it to 'auto' makes the line skip over the tails for a cleaner look.
text-decoration-style
typographySets the visual style of the decoration lines. You can make underlines wavy, dashed, dotted, or double.
text-decoration-thickness
typographySets the thickness (stroke width) of the decoration lines. You can use standard units like pixels or percentages to make underlines thicker or thinner.
text-emphasis
typographyThe shorthand property for adding emphasis marks to text. This is frequently used in East Asian languages to highlight important words, similar to how italics or bolding are used in English.
text-emphasis-color
typographySets the color of emphasis marks (like the dots or circles often used in East Asian typography) added to text.
text-emphasis-position
typographyDetermines where emphasis marks should be placed relative to the text. They can appear above (over), below (under), or on the sides for vertical text.
text-emphasis-style
typographyDefines the shape or appearance of emphasis marks. You can use standard shapes like circles and triangles, or even provide a custom character string.
text-indent
typographySets the amount of empty space that appears before the first line of text in a block. Negative values can be used to create 'hanging' indents.
text-justify
typographyWhen used with 'text-align: justify', this property decides exactly how space should be added between characters or words to fill the line.
text-orientation
typographyUsed in vertical writing modes to decide if individual characters should be rotated sideways or kept standing upright.
text-overflow
Defines how text is shown when it overflows its containing element. It can clip the text or add an ellipsis (...) to indicate there is more content.
text-rendering
Tells the browser what to prioritize when rendering text: speed of display, readability (legibility), or geometric precision. 'optimizeLegibility' is great for making headlines look their best.
text-shadow
typographyAdds a shadow to text. You can control the shadow's offset (X and Y), blur radius, and color. You can also stack multiple shadows by separating them with commas.
text-size-adjust
Mainly used for mobile devices, this property tells the browser whether it should automatically increase the size of text to make it more readable when you rotate your phone or zoom in. Setting it to 'none' prevents this behavior.
text-spacing-trim
typographyA modern property that helps manage the spacing between characters in CJK (Chinese, Japanese, Korean) typography. It specifically handles how 'half-width' punctuation and characters should be spaced to keep the layout looking clean.
text-transform
typographySpecifies how to capitalize an element's text. It can be used to make text appear in all-caps, all-lowercase, or with each word capitalized.
text-underline-offset
typographyAllows you to precisely control the distance between an underline and the text baseline. This is perfect for ensuring underlines don't cut through the tails of letters or are just positioned exactly where you want them.
text-underline-position
typographyDefines where an underline should be placed. While 'offset' moves it by a specific amount, 'position' lets you choose logical spots like 'under' the descenders (the tails of letters) or on the sides for vertical text.
text-wrap
typographyThe shorthand property for 'text-wrap-mode' and 'text-wrap-style'. It provides a powerful way to control both if text wraps and how the wrapping algorithm behaves.
text-wrap-mode
typographyA newer way to define if text should wrap to the next line or not. This is essentially a more modern version of the 'white-space' property for wrapping.
text-wrap-style
typographyControls the algorithm used to wrap text. 'balance' is perfect for short headlines to ensure lines are roughly equal in length, while 'pretty' avoids 'orphans' (single words on a new line) in paragraphs.
timeline-scope
animationsA powerful property for scroll-driven animations. It allows you to 'broaden' the scope of a named scroll timeline so it can be accessed by elements outside of the immediate parent/child relationship.
timeline-trigger
animationsThe shorthand property for setting all timeline trigger properties at once. It defines the name, source, and ranges for triggering scroll-driven animations.
timeline-trigger-name
animationsAn experimental property for scroll-driven animations. It allows you to name a specific point or 'trigger' in a timeline that an animation should react to.
timeline-trigger-source
animationsAn experimental property that defines which element's scroll progress should trigger a specific timeline-based animation.
top
positioningDetermines the vertical distance between the top edge of a positioned element and the top edge of its containing block.
touch-action
Tells the browser how to handle touch interactions (like swiping or pinching) on a specific element. This is vital for complex mobile UIs, such as custom maps or sliders, where you want to disable default browser scrolling to handle it yourself.
transform
transformsApplies 2D or 3D transformations to an element, allowing you to rotate, scale, skew, or move it in space.
transform-box
transformsDefines the bounding box that a transform (like a rotation or scale) is relative to. This is especially important for SVG elements where you might want to rotate an object around its own center instead of the SVG's top-left corner.
transform-origin
transformsSets the anchor point for a transform. For example, if you rotate a square, 'transform-origin' decides if it spins around its center, one of its corners, or even a point outside the square entirely.
transform-style
transformsDetermines if child elements should be rendered 'flat' against their parent or if they should exist in their own 3D space. This is essential for creating complex 3D scenes (like a rotating cube) where children need to overlap in a 3D environment.
transition
transitionsA shorthand property that allows you to define the transition between two states of an element's properties, making the change smooth rather than instant.
transition-behavior
transitionsAllows you to enable transitions for properties that normally switch instantly, like 'display'. By setting it to 'allow-discrete', you can create entry and exit animations for elements that are removed from the DOM or hidden.
transition-delay
transitionsSets the amount of time to wait before starting a transition once it has been triggered. This is useful for staggered animations or making hover effects feel more intentional.
transition-duration
transitionsSpecifies how long a transition should take to complete. A shorter duration makes changes feel snappy, while a longer one makes them feel smoother and slower.
transition-property
transitionsSpecifies which CSS properties should be animated during a transition. You can list specific properties like 'transform' or 'opacity' to ensure you aren't accidentally animating things that might hurt performance.
transition-timing-function
transitionsDefines the 'curve' or speed of a transition over its duration. It determines if the animation starts slow, ends fast, or follows a custom cubic-bezier path for more natural movement.
translate
transformsAn individual transform property that moves an element in 2D or 3D space without needing the shorthand transform property.
trigger-scope
animationsAn experimental property for scroll-driven animations. It defines how broadly a named timeline trigger is visible to other elements, allowing animations to be triggered by remote ancestors or descendants.
unicode-bidi
typographyProvides control over how the browser handles text that contains mixed directions (like English and Arabic). It works with the 'direction' property to ensure punctuation and character flow follow the correct logic for the specific language.
user-select
Controls whether the user can select text within an element. It is often used to prevent text selection on UI elements like buttons or icons.
vector-effect
Specifies a vector effect to be applied to an SVG shape. The most common value is 'non-scaling-stroke', which ensures that lines stay at the same thickness even when you scale up the entire SVG image.
vertical-align
Sets the vertical alignment of an inline or table-cell element. It's commonly used to align icons with text or to center content inside a table cell.
view-timeline
animationsA shorthand for defining a scroll timeline that is tied to when an element enters and leaves the visible part of the screen (the viewport). It's the core of modern 'reveal on scroll' animations.
view-timeline-axis
animationsSpecifies the axis (vertical or horizontal) that a 'view-timeline' should follow. For most standard web pages, this is 'block' (vertical scrolling).
view-timeline-inset
animationsAllows you to offset the 'start' and 'end' points of a view-timeline. This is useful if you want an animation to start before an element is fully on screen (e.g., when it's 20% visible) or continue after it has partially left.
view-timeline-name
animationsDefines a name for a view-timeline, which tracks an element's visibility within its scroll container. You can then use this name in your 'animation-timeline' property to trigger animations based on the element's position as you scroll.
view-transition-class
Allows you to apply names or 'classes' to specific view transitions. This makes it easier to target groups of elements with the same transition effects, rather than having to define them individually for every single element.
view-transition-name
The core property for enabling view transitions on specific elements. By giving an element a 'view-transition-name', the browser will automatically track its position and size across page changes and animate the difference.
visibility
layoutShows or hides an element without affecting the document layout. Unlike display: none, a hidden element still takes up space.
white-space
typographyControls how white space (spaces, tabs, and newlines) inside an element is handled. It can be used to prevent text from wrapping or to preserve multiple spaces and line breaks.
white-space-collapse
typographyA modern property that gives you fine-grained control over how the browser 'collapses' multiple spaces into one. It is essentially the first part of the classic 'white-space' property, now split out for better control.
widows
Specifies the minimum number of lines of a paragraph that must be left at the TOP of a new page or column when a page break occurs. It prevents lonely single lines from ending up on a new page by themselves.
width
box modelSets the width of an element. It can be defined in absolute units like pixels or relative units like percentages.
will-change
Tells the browser that an element is expected to change soon, allowing the browser to optimize for that change before it happens. Use it sparingly to improve performance for complex animations.
word-break
typographyDetermines if the browser can break a single word into multiple lines when it's too long to fit. This is essential for preventing long URLs or unbroken strings of text from breaking your layout on small screens.
word-spacing
typographyAdjusts the amount of space between words in a block of text. This can be used to improve readability or to create specific typographic effects by tightening or loosening the text flow.
writing-mode
typographyDefines whether lines of text are laid out horizontally or vertically, and the direction in which blocks progress. This is essential for supporting languages like Chinese, Japanese, or Arabic, and for creative layouts like vertical sidebars.
x
Directly sets the horizontal position (the x-coordinate) of an SVG shape or element. It is the CSS equivalent of the 'x' attribute used in SVG files.
y
Directly sets the vertical position (the y-coordinate) of an SVG shape or element. It is the CSS equivalent of the 'y' attribute used in SVG files.
z-index
positioningSets the stack order of a positioned element. Elements with a higher z-index are always in front of an element with a lower z-index.
zoom
A non-standard (but now widely supported) property that scales the entire element. While 'transform: scale()' is usually better for modern layouts, 'zoom' is still used for simple scaling without affecting the surrounding layout flow as much.
Selectors & Pseudo-classes 119 items
:active
Matches an element while it is actively being clicked or tapped. It's often used to give visual feedback (like a slight 'press' down effect) to the user.
:active-view-transition
Matches elements that are currently participating in a view transition. This allows you to apply specific styles or animations exclusively while the transition is in progress.
:active-view-transition-type
Allows you to target elements during a specific type of view transition. By naming your transitions (e.g., 'slide-in' or 'payout'), you can apply different styles for each scenario.
::after
Creates a 'virtual' element that appears as the last child of the selected element. It's commonly used for decorative elements like icons, dividers, or tooltips without adding extra HTML tags.
:any-link
Matches any element that is an anchor with an 'href' attribute, regardless of whether it has been visited. It's a cleaner way to style all links without having to list ':link' and ':visited' separately.
:attribute
Allows you to select elements based on the presence or value of their HTML attributes. This is powerful for styling elements like inputs with specific types or links pointing to PDF files.
:autofill
Matches an input element when its value has been automatically filled by the browser (like an address or credit card). It's useful for overriding the browser's default yellow background in autofilled fields.
::backdrop
Styles the area behind a full-screen element or dialog. It allows you to dim the background or add effects like blur when a modal is active.
::before
Creates a 'virtual' element that appears as the first child of the selected element. It's often used for quotes, bullet icons, or other decorative elements that don't need to be in the HTML markup.
:buffering
Targets media elements (like <video> or <audio>) while they are actively loading data and currently 'buffering'.
:checked
A pseudo-class that targets checkboxes, radio buttons, or option elements that are currently selected (checked) by the user.
::checkmark
An experimental pseudo-element part of the customizable select API that allows styling the checkmark icon in dropdown menus.
:child
The child combinator (>) selects elements that are immediate children of a specific parent, ignoring grandchildren or further descendants.
:class
The class selector (.) targets all elements that have a specific 'class' attribute. It is the most common and flexible way to apply styles in CSS.
::column
An experimental pseudo-element that allows you to style individual column boxes in a multi-column layout.
::cue
A pseudo-element that allows you to style VTT (Video Text Tracks) cues, such as subtitles or captions, inside a media element.
:default
A pseudo-class that targets form elements (like buttons or checkboxes) that are the default among a set of similar elements.
:defined
Matches any element that has been officially 'defined' by the browser. This includes all standard HTML elements and any custom elements that have been registered via JavaScript.
:descendant
The most common CSS combinator (a simple space). It targets an element that is inside (a descendant of) another specified element, no matter how deeply nested.
::details-content
An experimental pseudo-element that specifically targets the content part of a <details> element (the part that expands and collapses).
:dir()
A pseudo-class that targets elements based on the directionality of the text within them (e.g., left-to-right or right-to-left).
:disabled
A pseudo-class that targets elements that are in a disabled state (like a button with the 'disabled' attribute), making them unclickable and often grayed out.
:empty
A pseudo-class that targets any element that has absolutely no content inside it (not even whitespace or children).
:enabled
A pseudo-class that targets form elements (like inputs or buttons) that are in an 'enabled' state and can be interacted with.
::file-selector-button
A pseudo-element that targets the button part of an '<input type="file">' element, allowing you to style the 'upload' button directly.
:first
A page-target selector used within the '@page' rule to specifically style the first page of a printed document.
:first-child
A pseudo-class that targets an element only if it is the very first child of its parent.
::first-letter
A pseudo-element that targets the very first letter of the first line of a block-level element. perfect for creating drop caps.
::first-line
A pseudo-element that targets the entire first line of text within a block-level element. The line length changes as the browser window is resized.
:first-of-type
A pseudo-class that targets the first element of its specific type within a parent. For example, 'p:first-of-type' targets the first paragraph, even if it's not the first overall child.
:focus
A pseudo-class that targets an element that has been selected (e.g., clicked or tabbed to) and is ready to receive input.
:focus-visible
A pseudo-class that targets an element only when it is focused AND the browser determines focus should be visible (usually when using a keyboard, not a mouse).
:focus-within
A pseudo-class that targets an element if it or any of its children are focused. It's great for highlighting a whole form group when an input inside is active.
:fullscreen
Targets an element while it is being displayed in the browser's full-screen mode (e.g., when a video or a photo is expanded to fill the whole monitor).
:future
A pseudo-class used with WebVTT (video subtitles). It targets subtitle cues that are scheduled to appear 'in the future' relative to the current playback time.
::grammar-error
Matches text that the browser has flagged as having a grammatical error. You can use this to change the color or style of the grammar correction underline.
:has()
Matches an element if it contains at least one descendant or preceding element that matches the selector provided in the arguments. It is often referred to as the 'parent selector'.
:has-slotted
Matches a 'slot' in the Shadow DOM if it contains content that matches the selector. It's used within Web Components to style slots based on what's been put inside them.
:heading
An experimental pseudo-class that targets any heading element (h1, h2, h3, h4, h5, or h6) automatically.
headingfunction
An experimental pseudo-class function that targets a heading of a specific level or relative level (e.g., :heading(2) for h2).
::highlight
Targets custom text highlights created via the CSS Highlight API. It allows you to style specific ranges of text programmatically (ideal for search-and-highlight features).
:host()
Allows you to style the 'host' (the custom element itself) from within the element's own Shadow DOM. It's the standard way to set a component's default display, width, or height.
:host-context()
A pseudo-class used in Web Components to style the custom element based on its position in the outside page (e.g., styling a component differently if it's placed inside a 'dark-mode' container).
:hostfunction
Used inside a Shadow DOM to style the 'host' element (the custom element itself). The functional version ':host()' lets you apply styles only if the host matches a specific selector.
:hover
Targets an element when the user's cursor is positioned over it. It's the bread-and-butter for making interactive buttons and links.
:id
Targets a single, unique element on a page that has a matching 'id' attribute. Since IDs must be unique, this selector should only ever match one element.
:in-range
Targets form inputs (like type='number') whose current value is between the minimum and maximum limits set by 'min' and 'max' attributes.
:indeterminate
Targets form elements whose state is neither 'on' nor 'off' (like a checkbox that's been mixed by JavaScript, or a radio group where nothing is selected yet).
:interest-source
Experimental: Targets an element that is currently the 'source' of interest (the element being hovered or focused) which is triggering an interest-based UI like a tooltip.
:interest-target
Experimental: Targets the 'target' of an interest action (like the tooltip or popover itself) while it is currently being shown.
:invalid
Targets form inputs that contain data that doesn't follow the rules set by attributes like 'required', 'pattern', or 'type'.
:is()
Matches any element in its list while taking the specificity of its most specific argument. It is used to group selectors efficiently and reduce repetition.
:lang()
Targets elements based on the language they are written in (using the 'lang' attribute). It is smart enough to match sub-languages like 'en-US' when you search for 'en'.
:last-child
Targets an element only if it is the very last child inside its parent container.
:last-of-type
Targets the last element of a specific type (like the last <p> or the last <img>) within its parent container, even if there are other types of elements after it.
:left
A selector used inside the @page rule to target the physical 'left' pages of a double-sided printed document.
:link
Targets links (<a> elements with an 'href') that have not yet been visited by the user.
:list
A selector list is simply a comma-separated list of multiple selectors. If an element matches any one of the selectors in the list, the styles will be applied to it.
:loop
A selector that matches a media element (like <video> or <audio>) when it is currently set to play back in a loop.
::marker
Targets the list item marker (usually the bullet point or number) of a list element. It allows you to style the bullet separately from the text of the list item.
:modal
Targets an element that is in a 'modal' state, such as a <dialog> element opened with the showModal() method.
:muted
Targets media elements (like <video> or <audio>) when they are currently muted.
CSS Nesting (&)
Allows you to write CSS rules inside of other rules. This makes your code more organized and mirrors the structure of your HTML.
:next-sibling
Targets an element that is immediately following another element at the same level in the HTML structure.
:not()
Matches elements that do not match the list of selectors provided in its arguments. It allows you to exclude specific items from a general style rule.
:nth-child()
Targets elements based on their position in a list. You can use numbers, formulas (like 2n for 'every second'), or keywords like 'odd' and 'even'.
:nth-last-child()
Works exactly like :nth-child(), but it counts backwards from the very last element in the container.
:nth-last-of-type()
Targets elements of a specific type (like <p>) by counting backwards from the last one of that type in the container.
:nth-of-type()
Targets elements based on their position among siblings of the same type. For example, it can target 'the second image' even if there are paragraphs in between.
:only-child
Targets an element that is the ONLY child of its parent. If there are any other elements (even of a different type), it won't match.
:only-of-type
Targets an element that is the ONLY child of its type among its siblings. For example, 'the only image' in a div, even if there's also text.
:open
Targets elements that are currently in an 'open' state, such as a <details> element that is expanded or a <dialog> that is visible.
:open
A pseudo-class that matches elements when they are in an 'open' state, such as a <dialog> or <details> element. It's designed to provide a unified way to style openable components.
:optional
Targets form elements (like <input> or <select>) that do NOT have the 'required' attribute.
:out-of-range
Targets form inputs when their value is outside the limits specified by 'min' or 'max' attributes (for example, typing 11 in a 1-10 range input).
::part
A selector used inside a Shadow DOM that allows you to style specific internal pieces of a web component from the outside (the 'global' CSS).
:past
A selector used with WebVTT subtitles to style the text that has already been spoken in the current video caption.
:paused
A selector that matches a media element (like <video> or <audio>) when it is currently paused.
::picker
A pseudo-element selector part of the new customizable <select> API. it allows you to style the actual dropdown menu (the 'picker') that appears when you click a select box.
::picker-icon
A pseudo-element selector part of the new customizable <select> API. It identifies the icon or arrow that users click to open a selection menu.
:picture-in-picture
A selector that matches a media element (like <video>) when it is currently being played in a floating 'picture-in-picture' window.
::placeholder
A pseudo-element selector that lets you style the actual text of a placeholder inside an input field.
:placeholder-shown
A selector that matches an <input> or <textarea> element ONLY while it is currently showing its placeholder text (meaning the field is empty).
:playing
A selector that matches a media element (like <video> or <audio>) when it is currently playing.
:popover-open
Matches elements with the popover attribute that are currently in their open state. It allows you to style top-layer content like menus and tooltips specifically when they are visible.
:read-only
A selector that matches elements (like inputs) that cannot be edited by the user. This includes fields with the 'readonly' attribute or contenteditable fields that are disabled.
:read-write
A selector that matches elements that ARE editable by the user. This includes normal text inputs, textareas, or elements with 'contenteditable' turned on.
:required
A selector that matches any <input>, <select>, or <textarea> element that has the 'required' attribute set. It's often used to show a red asterisk or border on mandatory fields.
:right
A selector used in paged media (like printing) to style only the right-hand pages of a document (usually odd-numbered pages).
:root
A selector that matches the very top-level element of the document (usually the <html> tag in a website). It's the standard place to define global CSS variables.
::scroll-button
A new pseudo-element that allows you to style the 'up', 'down', 'left', and 'right' buttons that appear in scrollable containers (like scrollbars).
::scroll-marker
A new experimental pseudo-element that represents an individual navigation dot in a carousel. You can style these dots (like an active/inactive state) directly in CSS.
::scroll-marker-group
A new experimental pseudo-element that acts as a container for individual 'scroll markers'. It's used to create native CSS carousels with built-in navigation dots.
::search-text
A pseudo-element that allows you to style text that matches a 'find in page' search query. This lets you customize how highlighted search results appear in your site.
:seeking
A selector that matches a media element (like <video> or <audio>) while the user is actively 'seeking' or scrubbing through the timeline.
::selection
A pseudo-element that styles the part of a document that has been highlighted by the user (usually by clicking and dragging with the mouse).
::slotted
A pseudo-element used inside a Web Component (Shadow DOM) to style elements that have been 'slotted' into a <slot> tag from the light DOM.
::spelling-error
A pseudo-element that allows you to customize the styling of words that the browser identifies as having spelling errors.
:stalled
A selector that matches a media element (like <video> or <audio>) when it tries to fetch data but can't because of a slow network or connection issues.
:state()
A pseudo-class for Custom Elements that allows you to style them based on custom internal states (like 'loading', 'active', or 'error') that are set via JavaScript using the ElementInternals API.
:subsequent-sibling
Matched by the '~' symbol, this selector targets any siblings that come AFTER the specified element in the HTML. It doesn't have to be the very next sibling.
:target
Matches a unique element with an ID that matches the current URL's hash (e.g., #section1). Great for highlighting a section when a user clicks a 'Jump to Section' link.
:target-after
An experimental pseudo-class that matches a 'scroll marker' when it represents an item that comes AFTER the current viewport in a scroll container.
:target-before
An experimental pseudo-class that matches a 'scroll marker' when it represents an item that comes BEFORE the current viewport in a scroll container.
:target-current
An experimental pseudo-class that matches the 'scroll marker' corresponding to the item currently visible in the viewport. This is the 'active' state for carousel indicators.
::target-text
A pseudo-element that allows you to style text that has been targeted via a URL fragment (the part after the # in a URL). This is often used for 'scrol-to-text' highlights.
:universal
The 'asterisk' selector that matches every single element on the page. It is commonly used in CSS resets to apply a base style (like 'box-sizing: border-box') to everything at once.
:user-invalid
A modern pseudo-class that targets form elements that are currently invalid, but ONLY after the user has interacted with them. This avoids showing scary red errors immediately before the user has even started typing.
:user-valid
The companion to ':user-invalid', this targets form elements that are valid, but only after the user has finished interacting with them. It is great for showing 'Success' checkboxes without cluttering the form initially.
:valid
Targets any form element that currently meets its requirements (like matching a 'pattern' or having content in a 'required' field). Unlike ':user-valid', this can match immediately on page load.
::view-transition-group
Targets the transition 'group' container for a specific named view transition. This is the container that holds both the 'old' and 'new' snapshots of an element, allowing you to animate the entire group as it moves or scales.
view-transition-group-children
An experimental selector used in the View Transition API to target and style the children within a view transition group.
::view-transition-image-pair
Targets the 'pair' of images (the old snapshot and the new snapshot) within a view transition group. This is where the cross-fade between the two states actually happens.
::view-transition-new
Targets the 'new' state's snapshot in a view transition. This is the image of how the element looks AFTER the change, allowing you to specifically animate how it fades in.
::view-transition-old
Targets the 'old' state's snapshot in a view transition. This is the image of how the element looked BEFORE the change, allowing you to animate how it fades out or is removed.
:visited
Matches any link that the user has already visited in their browser. For privacy reasons, the browser only allows you to change a few specific properties (like 'color' and 'background-color') using this selector.
:volume-locked
An experimental pseudo-class that targets audio or video elements that are currently 'locked' from being muted or having their volume changed (often seen in certain accessibility contexts).
:where()
Matches any element in its list of arguments, but always has zero specificity. It is ideal for setting default styles that are intended to be easily overridden.
xr-overlay
An experimental pseudo-class that targets the root element of a 'DOM Overlay' when a web page is being viewed in an Immersive AR or VR environment.
At-Rules 21 items
@charset
An at-rule used to define the character encoding of the CSS file. It must be at the very first line of the file and only one is allowed.
@container
Lets you style elements based on the attributes of their parent container (like its width) rather than the entire browser viewport.
@counter-style
An at-rule that lets you create your own custom numbering systems (like using emojis or Roman numerals) for list bullets and counters.
@custom-media
An experimental at-rule that lets you define reusable media queries (like '@custom-media --tablet (max-width: 768px)') for cleaner, more maintainable code.
@font-face
Allows you to load custom fonts onto a webpage, so you aren't limited to the standard 'web-safe' fonts installed on a user's computer.
@font-feature-values
An at-rule that lets you define custom aliases for OpenType font features, making your CSS easier to read when working with complex typography.
@font-palette-values
An at-rule that lets you define your own custom color palettes for a color font (like an icon font or emoji font) by overriding its default colors.
@function
An experimental at-rule that lets you define your own custom CSS functions with logic and return values, very similar to functions in programming languages like JavaScript.
@import
Allows you to import style rules from other style sheets. It must be placed at the very top of your CSS file.
@keyframes
animationsDefines the steps of a CSS animation. You specify exactly which styles should change at specific points (0% to 100%) during the animation sequence.
@layer
A powerful way to organize your CSS into 'layers' of priority. It allows you to ensure that certain styles (like a theme) always override others (like a reset), regardless of selector specificity.
@media
Applies styles only when certain conditions are met, such as specific screen widths, resolutions, or user preferences like dark mode.
@namespace
Used in CSS to handle XML documents that have multiple 'namespaces' (like SVG mixed with XHTML). It tells CSS which namespace a selector should belong to.
@page
An at-rule used to apply styles specifically to printed pages. It lets you set things like page margins, size, and orientation for the whole document.
@position-try
An at-rule that allows you to define custom named sets of positioning properties. These can then be used as fallbacks in the 'position-try-fallbacks' property.
@property
The @property at-rule allows you to register custom CSS variables with a specific data type and initial value. This is powerful because it allows you to animate things that were previously impossible, like gradients.
@scope
The @scope at-rule allows you to limit the reach of your styles to a specific part of the page. This is a native alternative to things like 'CSS Modules' or 'Styled Components', letting you keep styles local without complex naming rules.
@starting-style
Allows you to define the initial styles for an element for its 'entry' animation. This is a game-changer because it lets you animate elements (like modals or dropdowns) as they are added to the DOM without using JavaScript timeouts.
style()
A part of container queries that lets you style elements based on the computed value of a CSS property (usually a custom property) on their parent container, rather than just size.
@supports
Checks for browser support of specific CSS features and applies styles only if those features are available.
@view-transition
Controls the browser's native view transition feature. It can be used to enable or disable transitions for specific elements or across the entire document during state changes.
Types & Functions 71 items
<abs>
A mathematical function that turns any number into its positive version. For example, if you have a calculation that results in -10px, abs(-10px) will return 10px.
<acos>
A trigonometric function that calculates the arccosine of a number. It's used in advanced CSS math for calculating angles in layouts or animations based on side lengths.
<anchor>
Allows an element (like a tooltip or menu) to be docked to another element on the page, ensuring it stays positioned relative to that target even if the page scrolls or layout changes.
<anchor-size>
A function that retrieves the width or height of the anchor element. It's incredibly useful for making a popup or menu match the exact dimensions of the button that triggered it.
<angle>
A basic CSS type for rotation values. It can be expressed in degrees (deg), radians (rad), gradians (grad), or turns (turn).
<angle-percentage>
A combination type that accepts either an explicit angle (like 45deg) or a percentage value that the browser converts into an angle based on a reference.
<asin>
A mathematical function that calculates the arcsine (inverse sine) of a number. It's used in advanced CSS math to determine angles based on vertical distances in layouts or animations.
<atan>
A mathematical function that calculates the arctangent of a number. This is essential for calculating slope-based angles in CSS without needing JavaScript.
<atan2>
A more advanced arctangent function that takes two numbers (y and x) to calculate the angle from the origin. It correctly handles all four quadrants, making it the most reliable tool for coordinate-based math in CSS.
attr()
Retrieves the value of an attribute from an element to use directly in CSS. The classic use is with the content property in pseudo-elements; using attr() with typed values on other properties is a newer experimental extension.
<basic-shape>
A CSS type that represents a geometric shape. These are used in properties like 'clip-path' and 'shape-outside' to create non-rectangular layouts, such as circles, polygons, or rounded boxes.
<blend-mode>
A type representing the mathematical way two colors mix together. Common values include 'multiply' (darkens), 'screen' (lightens), and 'overlay' (increases contrast), much like layer styles in Photoshop.
<calc>
Allows you to perform calculations when specifying CSS property values. You can mix different units, like percentages and pixels, in the same expression.
<calc-keyword>
A CSS type representing keywords that can be used inside mathematical functions like 'calc()'. Examples include 'e' (base of natural logarithms) and 'pi'.
<calc-size>
An experimental function that allows performing math on 'intrinsic' sizes like 'auto', 'min-content', or 'fit-content'. This is a key part of making it possible to animate from 'height: 0' to 'height: auto'.
<clamp>
Clamps a value between an upper and lower bound. It accepts a minimum, a preferred, and a maximum value, making it perfect for fluid typography.
<color>
Sets the foreground color of an element's text content. It accepts various formats like HEX, RGB, HSL, and named colors.
contrast-color()
A function that automatically selects a text color with the best contrast against a given background color. It's a game-changer for dynamic themes, ensuring text remains readable regardless of the background.
<corner-shape-value>
Represents the specific keywords (like 'round', 'angle', 'bevel') that define how a corner should be shaped.
<cos>
A CSS math function that calculates the cosine of an angle. This is incredibly powerful for complex animations or circular layouts purely in CSS.
<counter>
A function used in the 'content' property to display the current value of a CSS counter as text.
<counters>
Similar to 'counter()', but used for nested counters (like 1.1, 1.2, 1.2.1). It combines the values of all counters with the same name into a single string.
<dashed-function>
An experimental type of CSS function name that starts with two dashes (like '--foo()'). It's intended to be used for custom, user-defined functions in the future.
<dimension>
A general term for any CSS value that combines a number with a unit (like '10px', '2em', or '50%').
<dynamic-range-limit-mix>
An experimental function that allows you to mix different dynamic range limits (like SDR and HDR) to fine-tune how colors are displayed on high-brightness screens.
<easing-function>
Mathematical functions that control the speed of an animation over time (e.g., starting slow and ending fast). Common ones include 'ease-in', 'ease-out', and the customizable 'cubic-bezier()'.
<env>
A function that allows you to use environment variables defined by the browser, most commonly used to handle 'safe areas' on devices with notches or rounded corners.
<exp>
A CSS math function that calculates e (Euler's number) raised to the power of a specified number. Useful for complex scientific or geometric layouts.
<filter-function>
Refers to the specific functions used within the 'filter' property, such as 'blur()', 'contrast()', 'sepia()', or 'drop-shadow()'.
<flex>
A shorthand property that defines how a flex item grows or shrinks to fit the available space in its container.
<global_keywords>
Special words like 'inherit', 'initial', 'unset', and 'revert' that can be used on almost any CSS property to control how it handles cascades or default values.
<gradient>
A special image type that transitions smoothly between two or more colors. Common types include 'linear-gradient()', 'radial-gradient()', and 'conic-gradient()'.
<hypot>
A math function that calculates the hypotenuse of a right-angled triangle (the square root of the sum of squares of its arguments). It is useful for complex mathematical layouts where you need to calculate diagonal distances.
<if>
An experimental function that allows you to apply different values based on a condition (like a media query or a variable state) directly within a property value.
<image>
A generic CSS type representing any data that can be rendered as an image, including URLs (url()), gradients (linear-gradient()), or subsets of other images (image-set()).
<integer>
A CSS data type representing a whole number (positive, negative, or zero). It is used in properties like 'z-index', 'flex-grow', or for counting items.
<length>
A CSS data type representing a distance value. It consists of a number followed by a unit (like 'px', 'em', 'rem', 'vw', etc.).
<length-percentage>
A CSS data type that accepts either a length (like 20px) or a percentage (like 50%). It's used in properties like 'width', 'margin', and 'padding'.
<line-style>
A CSS data type representing the 'style' of a line, used in properties like 'border-style' or 'outline-style'. Common values include 'solid', 'dashed', and 'dotted'.
<log>
A math function that calculates the logarithm of a number. This is useful for advanced mathematical layouts where you need to scale values non-linearly.
<max>
Returns the largest (most positive) value from a list of comma-separated expressions. It is useful for creating layouts that grow but don't shrink below a certain point.
<min>
Returns the smallest (most negative) value from a list of comma-separated expressions. It is useful for creating layouts that shrink but don't grow beyond a certain point.
<mod>
A math function that returns the remainder of a division (modulo). This is useful for complex layouts where you need elements to repeat or cycle based on a value.
<number>
A CSS data type representing a real number (which can include decimals). It's used for values like 'opacity', 'line-height' (as a multiplier), or in math functions.
<overflow>
Sets what happens if content is too big to fit into its container. It can be clipped, hidden, or made to scroll.
<percentage>
A CSS data type representing a value relative to something else (usually the parent element's size or another property's value).
<position>
Specifies how an element is positioned in a document. It allows for static, relative, absolute, fixed, or sticky positioning, which changes how the element interacts with the page flow.
<pow>
An exponential math function that calculates a base raised to the power of an exponent. It's useful for creating non-linear scales (like font sizes or spacing).
<progress>
A relative math function that calculates how far a value is between two points (a start and an end). It returns a number between 0 and 1, essentially giving you a percentage of completion.
<random>
A new CSS math function that picks a random value from a range of possibilities. This allows for native CSS randomness without needing JavaScript.
<ratio>
A CSS data type representing the proportion of one side to another (like 16 / 9 for widescreen). It's primarily used in the aspect-ratio property or media queries.
<ray>
A function used in the motion path module to define a path that starts at a single point and shoots out in a specific direction (like a ray of light).
<rem>
A CSS unit that is relative to the font-size of the root element (usually the <html> tag). Unlike 'em', it doesn't change based on the parent's font size, making scaling much more predictable.
<resolution>
A media query property that describes the pixel density of the output device (like a 'Retina' display). It allows you to provide higher-quality images only for screens that can actually see the difference.
<round>
A math function that rounds a value to the nearest multiple of another value. For example, you can use it to ensure a width always rounds to the nearest 10 pixels.
<shape>
A basic data type that defines a 2D shape, like a circle, ellipse, or polygon. It's most commonly used with the 'clip-path' property to cut elements into specific shapes or with 'shape-outside' to make text flow around them.
shape()
A function used in 'clip-path' and other properties to define custom 2D shapes using commands like 'move', 'line', and 'curve'. It's basically like writing SVG paths directly in CSS.
<sibling-count>
A new experimental function that returns the total number of siblings an element has. This allows you to style elements based on how many items are currently in a list without using JavaScript.
<sibling-index>
A new experimental function that returns the 1-based index of an element among its siblings. You can use it to create staggered animations or dynamic styles without nth-child(n) hacks.
<sign>
A math function that returns -1 for negative numbers, 0 for zero, and 1 for positive numbers. It's useful for logic-based styling directly in your CSS.
<sin>
Calculates the sine of an angle. Part of the trigonometric function suite in CSS, allowing you to create complex circular layouts or wave-like animations.
<sqrt>
Calculates the square root of a number. This is part of the exponent function set in CSS, useful for relative scaling based on geometric areas.
<string>
A basic data type that represents a sequence of characters, always wrapped in quotes (e.g., 'Hello'). It's most commonly used with the 'content' property in pseudo-elements.
<superellipse>
A new experimental function for 'corner-shaping' that creates 'squircle' corners. This is the math-based rounding used by Apple in iOS icons to make corners look smoother and more organic than a standard circle.
<tan>
Calculates the tangent of an angle. Useful for complex geometric translations or rotations directly in CSS.
<text-edge>
A value type used with 'text-box-edge' to define which lines of the font (like the top of capital letters, the x-height, or the baseline) should be used as the boundaries for trimming.
<time>
The standard CSS data type for durations. It can be defined in seconds (s) or milliseconds (ms).
<transform-function>
A generic data type representing any function that alters an element's coordinate system. This includes common functions like rotate(), scale(), translate(), and skew().
<type>
A generic keyword used in newer CSS specs (like Mixins and Functions) to denote a specific data type requirement for a variable or argument.
<url>
The standard CSS function for including external resources like images, fonts, or SVGs into your stylesheet.
<var>
Lets you insert the value of a custom property (CSS Variable) into your stylesheet, making it easier to reuse colors, spacing, and other values across your design.