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

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

"first-line" Example

    
<html>
<head>
<style>
p:first-line { font-size:200%; color:red; }
</style>
</head>
<body>
<p>This is the first line of a sample text.
<br>
This is the second line.
</p>
</body>
</html>



"first-line" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<address>                       <blockquote>                  |
|                |<body>                          <center>                      |
|                |<dd>                            <div>                         |
|                |<dl>                            <dt>                          |
|                |<fieldset>                      <form>                        |
|                |<hn>                            <legend>                      |
|                |<li>                            <listing>                     |
|                |<marquee>                       <menu>                        |
|                |<p>                             <pre>                         |
|                |<xmp>                                                         |
+----------------+--------------------------------------------------------------+



"first-line" Syntax and Note

Note:
Apply special styles to the first line of a text element.