![]() Back to www.deitel.com |
1 <?xml version = "1.0"?> |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
4 |
5 <!-- Fig 6.3: advanced.html --> |
6 <!-- More advanced style sheets --> |
7 |
8 <html xmlns = "http://www.w3.org/1999/xhtml"> |
9 <head> |
10 <title>More Styles</title> |
11 |
12 <style type = "text/css"> |
13 |
14 a.nodec { text-decoration: none } |
15 |
16 a:hover { text-decoration: underline; |
17 color: red; |
18 background-color: #ccffcc } |
19 |
20 li em { color: red; |
21 font-weight: bold } |
22 |
23 ul { margin-left: 75px } |
24 |
25 ul ul { text-decoration: underline; |
26 margin-left: 15px } |
27 |
28 </style> |
29 </head> |
30 |
31 <body> |
32 |
33 <h1>Shopping list for <em>Monday</em>:</h1> |
34 |
35 <ul> |
36 <li>Milk</li> |
37 <li>Bread |
38 <ul> |
39 <li>White bread</li> |
40 <li>Rye bread</li> |
41 <li>Whole wheat bread</li> |
42 </ul> |
43 </li> |
44 <li>Rice</li> |
45 <li>Potatoes</li> |
46 <li>Pizza <em>with mushrooms</em></li> |
47 </ul> |
48 |
49 <p><a class = "nodec" href = "http://www.food.com"> |
50 Go to the Grocery store</a></p> |
51 |
52 </body> |
53 </html> |
Check Out Our Other CSS Tutorials
Introduction to Cascading Style Sheets (CSS)