Selecting Part of an Element

You can also select just the first letter or first line of an element and then apply formatting to that.

Figure 9.24. Adjusting the width of the window changes the content of the first lines (and thus, what is formatted).

To select the first line of an element:

1.
Type tag, where tag is the selector for the element whose first line you’d like to format.
2.
Type : (the colon).
3.
Type first-line to select the entire first line of the element referenced in step 1.
Figure 9.22. There is nothing highlighted here because you can’t identify the first line until the page is displayed in the browser.

To select the ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.