Files
freeCodeCamp/guide/english/css/selectors/pseudo/first-line/index.md
Taylor Stauss 73e6061004 CSS: ADD ::first-line pseudo-element document (#21291)
* CSS: ADD ::first-line pseudo-element document

* fix links, they were mistitled
2018-11-09 12:54:01 +05:30

716 B

title
title
First-Line

First-Line

The ::first-line CSS pseudo-element styles the first line of a selected HTML element.

General Syntax:

::first-line

Example

/* "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: