th color: darkslateblue; : th color « Tags « HTML / CSS






th color: darkslateblue;

    

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
    <head>
        <title>:first-child</title>
<style type='text/css'>
body {
    font-size: 12px sans-serif;
}
table {
    background: slateblue;
    color: #fff;
    width: 100%;
    border-collapse: collapse;
    border: 1px solid mediumslateblue;
}
td {
    border: 1px solid darkslateblue;
    padding: 2px;
}
th {
    background: lightsteelblue;
    color: darkslateblue;
    font-size: 18px;
    text-align: left;
}
table tbody tr:first-child td {
    background: mediumslateblue;
}
</style>
    </head>
    <body>
        <h1>Discography</h1>
        <table>
            <thead>
                <tr>
                    <th>Album</th>
                    <th>Year</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>A</td>
                    <td>March 1963</td>
                </tr>
                <tr>
                    <td>B</td>
                    <td>November 1963</td>
                </tr>
                <tr>
                    <td>C</td>
                    <td>July 1964</td>
                </tr>
                <tr>
                    <td>D</td>
                    <td>December 1964</td>
                </tr>
            </tbody>
        </table>
    </body>
</html>

   
    
    
    
  








Related examples in the same category

1.th color: navy
2.th color: #333;
3.th color: #FFF;
4.th color: #993300;
5.th color: black;