Collected by Elizabeth Janson Home Page |
|
Pseudo elementsPseudo-elements create abstractions about the document tree beyond those specified by the document language. For instance, document languages do not offer mechanisms to access the first letter or first line of an element's content. Pseudo-elements allow designers to refer to this otherwise inaccessible information. Pseudo-elements may also provide designers a way to refer to content that does not exist in the source document (e.g., the COMMENT - there needs to be no gaps in P:first-letter { <STYLE TYPE="text/css"> <!-- .firstwords { font-variant: small-caps; color:green } .firstletter {font-size:300%; color:blue} P:first-letter { font-size: 200%; font-style: italic; font-weight: bold; color: red; float: left } --> </STYLE>Testing the first-words element <P class="firstletter">T</SPAN><SPAN CLASS="firstwords">The first few words</SPAN> of a paragraph could be in small-caps. Style may also be inlined, such as changing the style of a word like <SPAN STYLE=" color:red; font-family: Arial ">
Arial</SPAN>.</P>
The first few words of a paragraph could be in small-caps. Style may also be inlined, such as changing the style of a word like Arial. The first few words of a paragraph could be in small-caps. Style may also be inlined, such as changing the style of a word like Arial.
1 The :first-line pseudo-element
2 The :first-letter pseudo-element
|
CSS begins here |
|
Tetbury residents in the Eighteenth Century my Australian Family History and Barrie, our Family Poet. |