CSS Selector List (,) Selector
Description
The Selector List (,) selector is a powerful CSS tool that allows multiple, distinct selectors to share a single set of style rules. By separating individual selectors with a comma, you can apply the same styles to different elements simultaneously, which helps reduce code repetition and keeps stylesheets cleaner and more maintainable. This is particularly useful when you want several unrelated elements to share common styling without writing separate rules for each.
Using a Selector List (,) is conceptually similar to combining multiple selectors, such as a type selector or a class selector, but instead of creating a hierarchy or relationship, each selector in the list is treated independently. The styles defined in the rule set are applied to all elements that match any of the selectors in the list. For example, you could target all paragraphs and all headings in a section and give them the same text color or font styling.
One practical advantage of Selector List (,) is its efficiency when managing theme changes or responsive design. Instead of duplicating identical declarations across multiple selectors, you can list all relevant selectors together. This becomes even more useful when combined with color, margin, or font-size properties, allowing for uniform styling across different types of content. For example, you might write a rule that targets both h1 and h2 elements, giving them the same font color, which ensures visual consistency across headings.
In practice, a Selector List (,) might look like this: multiple p and li elements could be targeted together so that both have the same spacing and text style. This approach streamlines CSS maintenance, reduces redundancy, and provides clear visibility of shared styling rules, making it easier for developers to manage complex layouts.
Syntax
element, element { css declarations; }
Example
Browser Support
The following information will show you the current browser support for the CSS Selector List (,) selector. Hover over a browser icon to see the version that first introduced support for this selector.
This CSS selector list (,) selector is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 2nd January 2026
