Pseudo-elements select part of an element. In this video, learn to use the four most commonly used pseudo-elements correctly, including before, after, first-line, and first-letter.
- [Instructor] Pseudo-elements look like … pseudo-classes but they're much lower … in specificity, more like an HTML element selector. … They change a part of a selected element … but not the whole element as most selectors do. … Some pseudo-elements are written in two forms … of syntax and specifically the four I cover here … are affected by this. … There are pseudo-elements that were introduced … in CSS two where they were written with a single … colon so they look like pseudo-classes. … But in CSS three they changed the pseudo-element … syntax to two colons so you don't have to remember … whether a pseudo-element supports one or two colons. … Just be safe and write 'em all with two colons … going forward. … There are several pseudo-elements available … to you but I'm going to focus on the four … with the best support and that are probably the most used. … And so the first one I want to talk about … is the first letter construct. … And so first letter will take the first letter, … say of this paragraph, and style it in some special way. …
- Targeting classes and IDs
- Working with group selectors
- Targeting element attributes
- Targeting links with pseudo-class selectors
- Targeting child elements and empty elements
- Targeting parent, child, and sibling elements
- Best practices for CSS
- The impact of CSS selectors on performance
Skill Level Beginner
The power of selectors1m 8s
1. Review of Basic CSS
2. Combinator Selectors
3. Attribute Selectors
Simple attribute selectors2m 47s
4. Pseudo-Classes, Pseudo-Elements, and the Universal Selector
5. Choosing Selectors
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.