2. -  -

 CSS1             .        ,       .  -  -     CSS1,   ,     ,     .

-  -     CSS,        HTML. ,  "" UA     .         .

-     ,     -     .
2.1 - 

UA             ..  CSS1      -  'A':
  A:link { color: red }       /* unvisited link */
  A:visited { color: blue }   /* visited links */
  A:active { color: lime }    /* active links */

  'A'   'HREF'           (.. -    -). UA        'visited'  'link'    .   'active' -  ,      (    ) .

 -   ,       . UA            -  .      ,  'font-size'   'active'   ,     'visited',  UA     ,      'visited'.

 -      .         :

  A:link { color: red }

  <A CLASS=link NAME=target5> ... </A>

 CSS1 -        ,  'A'.       :
  A:link { color: red }
  :link { color: red }

      CSS1.

 -    .

-     :
  A:link IMG { border: solid blue }

-      :
  A.external:visited { color: blue }

  <A CLASS=external HREF="http://out.side/">external link</A>

      ,    .  ,       -  .
2.2  -

        ,      .  CSS1     ,      -:      .

 CSS1: UA      ':first-line'  ':first-letter'  ,      -. (.  7)
2.3 - 'first-line'

- 'first-line'               :
  <STYLE TYPE="text/css">
    P:first-line { font-style: small-caps }
  </STYLE>

  <P>The first line of an article in Newsweek.

  UA      :
  THE FIRST LINE OF AN
  article in Newsweek.

      :
  <P>
  <P:first-line>
  The first line of an
  </P:first-line>
  article in Newsweek.
  </P>

  'first-line'         ,     .

- 'first-line'      .

- 'first-line'      .         'first-line':   (5.2),     (5.3), 'word-spacing' (5.4.1), 'letter-spacing' (5.4.2), 'text-decoration' (5.4.3), 'vertical-align (5.4.4), 'text-transform' (5.4.5), 'line-height' (5.4.8)  'clear' (5.5.26).
2.4 - 'first-letter'

- 'first-letter'     ,    .    ,    'float'  'none',     .  - 'first-letter'   :   (5.2),     (5.3), 'text-decoration' (5.4.3), 'vertical-align (  'float'  'none', 5.4.4), 'text-transform' (5.4.5), 'line-height' (5.4.8),   (5.5.1-5.5.5),   (5.5.6-5.5.10),   (5.5.11-5.5.22), 'float' (5.5.25), 'clear' (5.5.26).

     ,        :
<HTML>
 <HEAD>
  <TITLE>Title</TITLE>
  <STYLE TYPE="text/css">
   P              { font-size: 12pt; line-height: 12pt }
   P:first-letter { font-size: 200%; float: left }
   SPAN           { text-transform: uppercase }
  </STYLE>
 </HEAD>
 <BODY>
  <P><SPAN>The first</SPAN> few words of an article in The Economist.</P>
 </BODY>
</HTML>

   UA  - 'first-letter' (    ),        :
  ___
   | HE FIRST few
   | words of an
  article in the
  Economist.

       :
  <P>
  <SPAN>
  <P:first-letter>
  T
  </P:first-letter>he first
  </SPAN>
  few words of an article in the Economist.
  </P>

 ,   - 'first-letter'   (..  ),       - 'first-line'     ,    .

UA  ,      'first-letter'.  ,   ,  :

  ||   /\    bird in
      /  \   the hand
     /----\  is worth
    /      \ two in
  the bush," says an
  old proverb.

       ( )   ,     (    ), - 'first-letter'  .

     ,     .  , ,     "ij",      - 'first-letter'.

- 'first-letter'      .
2.5 -  

   -     :
  BODY P:first-letter { color: purple }

-      :
  P.initial:first-letter { color: red }

  <P CLASS=initial>First paragraph</A>

         ,   initial.      - -     .         -.
2.6  -

   -:

  P { color: red; font-size: 12pt }
  P:first-letter { color: green; font-size: 200% }
  P:first-line { color: blue }

  <P>Some text that ends up on two lines</P>

       'P'      24pt.    (     )  ,         . ,       "ends",     :
  <P>
  <P:first-line>
  <P:first-letter>
  S
  </P:first-letter>ome text that
  </P:first-line>
  ends up on two lines
  </P>

 ,   'first-letter'    'first-line'. ,   'first-line'   'first-letter',   ,       'first-letter'.

 -            . ,   SPAN    </P:first-line>,       SPAN, ..      :
  <P>
  <P:first-line>
  <SPAN>
  This text is inside a long
  </SPAN>
  </P:first-line>
  <SPAN>
  span 
  </SPAN>