CSS: ADD ::first-line pseudo-element document (#21291)
* CSS: ADD ::first-line pseudo-element document * fix links, they were mistitled
This commit is contained in:
committed by
Niraj Nandish
parent
ae0696a55b
commit
73e6061004
28
guide/english/css/selectors/pseudo/first-line/index.md
Normal file
28
guide/english/css/selectors/pseudo/first-line/index.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: First-Line
|
||||
---
|
||||
## First-Line
|
||||
|
||||
The ```::first-line``` CSS pseudo-element styles the first line of a selected HTML element.
|
||||
|
||||
General Syntax:
|
||||
|
||||
```css
|
||||
::first-line
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```css
|
||||
/* "First line of every paragraph is set to bold*/
|
||||
p::first-line {
|
||||
font-weight: bold;
|
||||
}
|
||||
```
|
||||
|
||||
The ```::first-line``` CSS pseudo-element is often paired with the ```::first-letter``` CSS pseudo-element for a drop caps effect emphasizing the first letter and line of a paragraph.
|
||||
|
||||
#### More Information:
|
||||
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/::first-line)
|
||||
* [W3 Schools](https://www.w3schools.com/cssref/sel_firstline.asp)
|
||||
* [CSS Tricks](https://css-tricks.com/almanac/selectors/f/first-line/)
|
Reference in New Issue
Block a user