HTML CSS Reference/CSS Attributes and Javascript Style Properties/first line

Материал из Web эксперт
Перейти к: навигация, поиск

"first-line" Example

   <source lang="html4strict">
   

<html> <head> <style> p:first-line { font-size:200%; color:red; } </style> </head> <body>

This is the first line of a sample text.
This is the second line.

</body> </html>


     </source>
   
  


"first-line" is applied to

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+

| Applied_To |<address>
| | |<body>
| | |
| | |
| | |<fieldset> <form> | | |<hn> <legend> | | |
  • <listing> | | |<marquee> <menu> | | |

                             |
    |                |<xmp>                                                         |
    +----------------+--------------------------------------------------------------+
          
          </source>
        
       
    
    
    

    "first-line" Syntax and Note

    <source lang="html4strict"> Note: Apply special styles to the first line of a text element.


    </source>