HTML and CSS Reference
In-Depth Information
<tr class=”evenRow”>
The zebra stripes are clear, even in the black-and-
white image shown in Figure 17-11. Of course, you
have to be careful that there is sufficient contrast
between the background and text color. If neces-
sary, be sure to define a color attribute with an
appropriate color for your row class.
Try iT
In this Try It you learn how to style a table.
Lesson requirements
You will need the tpa_jupiter.html file from the
Lesson_17 folder, as well as a text editor and web
FiGure 17-11
You can download the code and resources for this lesson from the topic's web
page at .
Open your text editor.
From the Lesson_17 folder, open tpa_jupiter.html .
Put your cursor before the closing </style> tag within the <head> section and press Enter
Enter the following code:
table {
width: 100%;
border-collapse: collapse;
td {
text-align: center;
width: 25%;
padding: 10px 0;
border-bottom: 2px black solid;
Search WWH ::

Custom Search