Creating Link Lists

The most common use for lists on the Web is simply listing hypertext links, or what are commonly called “link lists.” To test out an example of controlling the appearance of link lists, first make the following changes to your style sheet:

ul li {  margin-right: 2em; margin-top: 1em; padding-left: 1.5%; font-style:
						italic; }
ul a {  font-family: Verdana, Arial, sans-serif; font-weight: bold; color: red;
						background: transparent; text-decoration: none; font-style: normal; }
					

This causes the UL element's list item text to be displayed in an italic font; the ul a contextual style sets the display characteristics for hypertext links (the A element) that are nested inside of the UL element. Hypertext links that aren't nested inside ...

Get Cascading Style Sheets (CSS) by Example 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.