printable version

Test 3

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Problem X3.1.

[8 pts] Without changing the HTML below, write CSS rules accomplishing each of the following.

a. Color only the names Washington, Jefferson, and Monroe blue.

b. Display only the year 1789 in boldface. (Use font-weight: bold.)

<table>
  <tr class="odd" id="first">
    <td class="name">Washington<td>
    <td class="year">1789</td>
  </tr>
  <tr class="even">
    <td class="name">Adams<td>
    <td class="year">1797</td>
  </tr>
  <tr class="odd">
    <td class="name">Jefferson<td>
    <td class="year">1801</td>
  </tr>
  <tr class="even">
    <td class="name">Madison<td>
    <td class="year">1809</td>
  </tr>
  <tr class="odd">
    <td class="name">Monroe<td>
    <td class="year">1817</td>
  </tr>
</table>