Sunday, 30 December 2012

How to use style sheets in HTML Tables

<html>
<body style="background-color:yellow;">
<table border="1">
<tr>
  <td>
   <p style="background-color:green;">This is a paragraph</p>
   <p style="background-color:green;">This is another paragraph</p>
  </td>
  <td>This cell contains a table:
   <table border="1">
   <tr>
     <td>A</td>
     <td>B</td>
   </tr>
   <tr>
     <td>C</td>
     <td>D</td>
   </tr>
   </table>
  </td>
</tr>
<tr>
  <td>This cell contains a list
   <ul>
    <li>apples</li>
    <li>bananas</li>
    <li>pineapples</li>
   </ul>
  </td>
  <td>HELLO</td>
</tr>
</table>

</body>
</html>

No comments:

Post a Comment