CSS selectors level 3 defines a target pseudo class that matches if an element has an id attribute with the same value as any hash value in the URL.
Below are a set of targets and links activating them. Green target text indicates a match.
Case | Description | Link | Target | Firefox (10.0.1) | Internet Explorer (9.0.8112) | Safari (5.1.2) | Opera (11.61) | Chrome (17.0.963) |
---|---|---|---|---|---|---|---|---|
A | XHTML element with no prefix | set target=a | target a | Passed | Passed | Passed | Passed | Passed |
B | XHTML element with prefix | set target=b | Passed | Passed | Passed | Passed | Passed | |
C | Custom element with prefix | set target=c | Failed | Failed | Passed | Failed | Passed |