CSS Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.Anti-spam check. Do not fill this in! ====Summary of selector syntax==== The following table provides a summary of selector syntax indicating usage and the version of CSS that introduced it.<ref>{{cite web |url=https://www.w3.org/TR/selectors/ |title=Selectors Level 3 |publisher=W3C |access-date=2014-05-30 |archive-url=https://web.archive.org/web/20140603165900/https://www.w3.org/TR/selectors/ |archive-date=2014-06-03 |url-status=live }}</ref> {| class="wikitable" |- ! Pattern !! Matches !! First defined<br/>in CSS level |- | {{code|2=css|1=E}} || an element of type E || 1 |- | {{code|2=css|1=E:link}} || an E element that is the source anchor of a hyperlink whose target is either not yet visited (:link) or already visited (:visited) || 1 |- | {{code|2=css|1=E:active}} || an E element during certain user actions || 1 |- | {{code|2=css|1=E::first-line}} || the first formatted line of an E element || 1 |- | {{code|2=css|1=E::first-letter}} || the first formatted letter of an E element || 1 |- | {{code|2=css|1=.c}} || all elements with class="c" || 1 |- | {{code|2=css|1=#myid}} || the element with id="myid" || 1 |- | {{code|2=css|1=E.warning}} || an E element whose class is "warning" (the document language specifies how class is determined) || 1 |- | {{code|2=css|1=E#myid}} || an E element with ID equal to "myid" || 1 |- | {{code|2=css|1=.c#myid}} || the element with class="c" and ID equal to "myid" || 1 |- | {{code|2=css|1=E F}} || an F element descendant of an E element || 1 |- | {{code|2=css|1=*}} || any element || 2 |- | {{code|2=css|1=E[foo]}} || an E element with a "foo" attribute || 2 |- | {{code|2=css|1=E[foo="bar"]}} || an E element whose "foo" attribute value is exactly equal to "bar" || 2 |- | {{code|2=css|1=E[foo~="bar"]}} || an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar" || 2 |- | {{code|2=css|1=E<nowiki>[foo|="en"]</nowiki>}} || an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en" || 2 |- | {{code|2=css|1=E:first-child}} || an E element, first child of its parent || 2 |- | {{code|2=css|1=E:lang(fr)}} || an element of type E in language "fr" (the document language specifies how language is determined) || 2 |- | {{code|2=css|1=E::before}} || generated content before an E element's content || 2 |- | {{code|2=css|1=E::after}} || generated content after an E element's content || 2 |- | {{code|2=css|1=E > F}} || an F element child of an E element || 2 |- | {{code|2=css|1=E + F}} || an F element immediately preceded by an E element || 2 |- | {{code|2=css|1=E[foo^="bar"]}} || an E element whose "foo" attribute value begins exactly with the string "bar" || 3 |- | {{code|2=css|1=E[foo$="bar"]}} || an E element whose "foo" attribute value ends exactly with the string "bar" || 3 |- | {{code|2=css|1=E[foo*="bar"]}} || an E element whose "foo" attribute value contains the substring "bar" || 3 |- | {{code|2=css|1=E:root}} || an E element, root of the document || 3 |- | {{code|2=css|1=E:nth-child(n)}} || an E element, the n-th child of its parent || 3 |- | {{code|2=css|1=E:nth-last-child(n)}} || an E element, the n-th child of its parent, counting from the last one || 3 |- | {{code|2=css|1=E:nth-of-type(n)}} || an E element, the n-th sibling of its type || 3 |- | {{code|2=css|1=E:nth-last-of-type(n)}} || an E element, the n-th sibling of its type, counting from the last one || 3 |- | {{code|2=css|1=E:last-child}} || an E element, last child of its parent || 3 |- | {{code|2=css|1=E:first-of-type}} || an E element, first sibling of its type || 3 |- | {{code|2=css|1=E:last-of-type}} || an E element, last sibling of its type || 3 |- | {{code|2=css|1=E:only-child}} || an E element, only child of its parent || 3 |- | {{code|2=css|1=E:only-of-type}} || an E element, only sibling of its type || 3 |- | {{code|2=css|1=E:empty}} || an E element that has no children (including text nodes) || 3 |- | {{code|2=css|1=E:target}} || an E element being the target of the referring URI || 3 |- | {{code|2=css|1=E:enabled}} || a user interface element E that is enabled || 3 |- | {{code|2=css|1=E:disabled}} || a user interface element E that is disabled || 3 |- | {{code|2=css|1=E:checked}} || a user interface element E that is checked (for instance a radio button or checkbox) || 3 |- | {{code|2=css|1=E:not(s)}} || an E element that does not match simple selector s || 3 |- | {{code|2=css|1=E ~ F}} || an F element preceded by an E element || 3 |} Summary: Please note that all contributions to Christianpedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Christianpedia:Copyrights for details). Do not submit copyrighted work without permission! Cancel Editing help (opens in new window) Discuss this page