Share this Page URL

Ensuring Backward and Forward Compatibil... > Using HTML and CSS Comments - Pg. 165

162 Learn HTML 4 In a Weekend Horizontally Aligning Table Rows By default, the content of table cells is left-aligned. Use the ALIGN attribute to right-align the content of all cells within each table row (see Figure 5.11): <table align="center" border="6" cellspacing="6" cellpadding="6" width="75%"> <tr><th></th> <th>Jan</th> <th>Feb</th> <th>Mar</th> <th>Totals</th></tr> <tr align="right"><th>Alberts</th> <td>$160,251</td> <td>$245,600</td> <td>$132,000</td> <td>$537,851</td></tr> <tr align="right"><th>Brown</th> <td>225,255</td> <td>115,995</td> <td>132,875</td> <td>474,125</td></tr> <tr align="right"><th>Gilbertson</th> <td>240,168</td> <td>390,295</td> <td>175,000</td> <td>805,463</td></tr> <tr align="right"><th>Sikorsky</th> <td>100,678</td> <td>185,343</td> <td>260,825</td> <td>546,846</td></tr> <tr align="right"><th>Yang</th> <td>265,015</td> <td>333,838</td> <td>148,345</td> <td>747,198</td></tr> <tr align="right"><th>Totals</th> <td>$991,367</td> <td>$1,271,071</td> <td>$849,045</td> <td>$3,111,483</td></tr> </table> Right- alignment Figure 5.11 The content of the table rows is right- aligned.