<link rel="stylesheet" type="text/css" href="stylesheetcss.css" /> </head> <body> <h1> Basic CSS Font Properties</h1> <p>The following table shows you the basic CSS font properties that allow you to change the appearance of text in your documents.</p>
<table> <tr> <th>Property</th> <th>Purpose</th> </tr> <tr> <td class="code">font-family</td> <td>Specifies the font used</td> </tr> <tr> <td class="code">font-size</td> <td>Specifies the size of the font used</td> </tr> <tr> <td class="code">font-style</td> <td>Specifies whether the font should be normal, italic or oblique</td> </tr> <tr> <td class="code">font-weight</td> <td>Specifies whether the font should be normal, bold, bolder, or lighter</td> </tr> </table> </body> </html>
And for my Style Sheet I have this but its not working and its in the same directory
For some reason on the .html page the second row for my tables is not showing up and whateve I do cant fix it plus my CSS is not linking up and ive tried many things to no avail could someone please point me in the right direction
Msg#: 4349708 posted 12:57 am on Aug 10, 2011 (gmt 0)
Start with the embarrassingly obvious. Is your stylesheet in fact named stylesheetcss.css ? Is it only the color names that aren't coming through, or also the other properties? What about the rest of the CSS? You've got a class = "code" that you didn't include in your example.
Color names in the format you've used need a leading # or they will not be recognized.
Most important: Your DTD is in the wrong form. Feed it into the validator as a direct paste-in (I filled in the missing line as ... "DTD/xhtml1-strict.dtd"> ) and it will spit out 30 errors, most of them fixable by a single change.
Throw out the xml line, which you don't need, and replace the next few lines with
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">