Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed CSS Selectors!
You have completed CSS Selectors!
Preview
The ::first-line and ::first-letter pseudo-elements let us target the first line of text and the first character in a line of text.
Quick Reference
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
pseudo-elements style certain parts of an
element.
0:00
And they can insert elements and content,
into our page, from our CSS.
0:01
Pseudo-elements are exactly what their
name implies.
0:05
They are phony elements that are not part
of the DOM,
0:08
the way real HTML elements are.
0:11
And they can help keep our HTML cleaner,
because they target virtual elements that
0:14
are not defined in the markup, and they
don't appear in the source code.
0:18
Now, there are four types of
pseudo-elements in CSS.
0:22
So, let's begin by taking a look at the
first line, and
0:25
first letter pseudo-elements.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up