HTML file: | Displayed by browser: |
---|---|
<style>
p::first-line { color: #ff0000; font-variant: small-caps; } </style> <body> <p>You can use the ::first-line pseudo-element to add a special effect to the first line of a text. This is the first paragraph on this webpage. Some more text. And even more, and more.</p> <p>The second paragraph will be affected the exact same way, so you can have a very consistent look throughout a webpage. Some more text. And even more, and more.</p> </body> |
You can use the ::first-line pseudo-element to add a special effect to the first line of a text. This is the first paragraph on this webpage. Some more text. And even more, and more. The second paragraph will be affected the exact same way, so you can have a very consistent look throughout a webpage. Some more text. And even more, and more. |
|
|