li {color:red}
li.spacious {margin: 20px}
#bordered {border:1px black solid}
* {color :green}
a[href="https://www.google.com"] {font-size: 2em}
,
h1, .special { color: blue; }
+
/* Paragraphs that come immediately after any h1 */ h1+p { color: red; }
~
/* all <h2> elements that are siblings of and subsequent to any h1 */ h1~h2 { color: red; }
>
/* List items that are children of the "my-things" list */ ul.my-things>li { color: red; }
/* List items that are descendants of any <div> */ div li { color: red; }
::
/* Selects the first lines of any <p> */ p::first-line {color: red;} /* Selects the first letters of any <p> */ p::first-letter {font-size: 2em;}
:
/* Selects any <p> that is the last element among its siblings */ p:last-child { color: lime; } /* Selects the second <li> element in any list */ li:nth-child(2) { color: lime; }
a:link
a:visited
a:hover
a:active
ex05.html
smiley.gif
global styles