Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

compound

The compound selector represents a comma separated list of simple selectors. It acts as a way to target multiple elements by type, class, id, attribute or pseudo class.
Syntax Logicelement, element, ... { property_list }

CSS Code Example

<style> h1, div, p#p1{ color: red; } </style> <h1>Heading Content</h1> <p>Paragraph content ...</p> <div>Div content ...</div> <p id="p1">Paragraph content ...</p>

CSS

Selectors

universaltypecompoundclassidnotattributedescendantchildadjacent siblinggeneral siblingfirst childlast childonly childfirst of typelast of typeonly of typenth childnth last childnth of typenth last of typeemptyrootfirst linefirst letterbeforeafterlinkvisitedhoveractivefocustargetenableddisabledcheckedlang