Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

id

The id selector will target an element by its unique id.
Syntax Logic#element_id { property_list }

CSS Code Example

Target an element by its id regardless of its type: <style> #heading1 { border:#06C 1px solid; } </style> <h3 id="heading1">My heading content</h3> <h3>My heading content</h3> Target an element by id only if it is a specific type of element: h3#heading1 { }

CSS

Selectors

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