Community and Support Forums |
||
| Home | Support | Testimonials | FAQ | Members | Affiliate | ||
|
|||||||
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Moderator
Join Date: Jan 2009
Posts: 59
|
Pseudo-elements are fictional elements that do not exist in HTML. They address the element's sub-part (non-existent in HTML) and not the element itself. In CSS1 there are two pseudo-elements: 'first-line pseudo-element' and 'first-letter pseudo-element'. They can be attached to block-level elements (e.g. paragraphs or headings) to allow typographical styling of their sub-parts. Pseudo-element is created by a colon followed by pseudo-element's name, e.g:
P:first-line H1:first-letter and can be combined with normal classes; e.g: P.initial:first-line First-line pseudo-element allows sub-parting the element's first line and attaching specific style exclusively to this sub-part; e.g.: P.initial:first-line {text-transform: uppercase} <P class=initial>The first line of this paragraph will be displayed in uppercase letters</P> First-letter pseudo-element allows sub-parting the element's first letter and attaching specific style exclusively to this sub-part; e.g.: P.initial:first-letter { font-size: 200%; color: red} <P class=initial>The first letter of this paragraph will be displayed in red and twice as large as the remaining letters</P> |
|
|
|
|
#2 |
|
Junior Member
|
...teaching html and css? For the smart people: please note that I meant "for learning", not "for teaching"
Thanks |
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What are pseudo-classes? | praveen.mathew | HTML and CSS | 0 | 28th January 2009 07:57 AM |
| Why do we use AJAX for pseudo client-side validation instead of simple JavaScript? | babuvarghese | Javascript and Ajax | 0 | 28th January 2009 04:22 AM |
| html elements with different padding | Robin.Paulose | HTML and CSS | 0 | 13th January 2009 10:47 AM |