Advertisement
MrsMcLead

More Tables

Jan 28th, 2014
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.20 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>
  4. Tables
  5. </title>
  6. </head>
  7.  
  8. <body>
  9. <h1> Making a Table </h1>
  10. <table border = ""summary = "My table is all about tables">
  11. <!-- Do we mean table to look at or to eat on?-->
  12. <caption> All About Tables </caption>
  13. <tr align = center>
  14.     <th scope = "col">Size of Table </th>
  15.     <th scope = "col">Type of Material </th>
  16.     <th scope = "col">Store</th>
  17. </tr>
  18.  
  19. <tr>
  20.     <td valign = bottom> 6 x 8 </td>
  21.     <td valign = top> Mahogany </td>
  22.     <td> <a href ="http://www.lowes.com/"> Loews </a> and some more
  23.     text just to demonstrate the different things that
  24.     tables can do! and some more
  25.     text just to demonstrate the different things that
  26.     tables can do! and some more
  27.     text just to demonstrate the different things that
  28.     tables can do!</td>
  29. </tr>
  30.  
  31. <tr>
  32.     <td> 7 x 9</td>
  33.     <td> Oak </td>
  34.     <td> <a href = "http://www.homedepot.com/">Home Depot </a></td>
  35. </tr>
  36.  
  37. <tr>
  38.     <td> 21 x 42</td>
  39.     <td> Maple </td>
  40.     <td> <a href = "http://www.walmart.com/"> Walmart </a> </td>
  41. </tr>
  42. <tr>
  43.     <td colspan = 2> I am not a fan of Walmart</td>
  44.     <td> but I like low prices, so I'm stuck.</td>
  45. </tr>
  46. <tr>
  47.     <td rowspan = 3> Here's a big cell </td>
  48.     <td > A </td>
  49.     <td > B </td>
  50. </tr>
  51. <tr>
  52.     <td> C</td>
  53.     <td> D </td>
  54. </tr>
  55. <tr>
  56.     <td> E</td>
  57.     <td> F </td>
  58. </tr>
  59.  
  60.  
  61. </table>
  62.  
  63. <br><br>
  64. <p>
  65. That's a lot of stuff in that table! I think it's time for some
  66. new tables.
  67. </p>
  68. <h2> Changing the Width and Height </h2>
  69. <h3>...by pixels</h3>
  70. <table border ="">
  71. <tr>
  72.     <th scope = "col"  align = center colspan = 3> Awesome Title</th>
  73. </tr>
  74. <tr>
  75. <th scope = "row" valign = center rowspan = 4 width = 25>
  76. My Row Title </th>
  77.     <td>a</td>
  78.     <td>b</td>
  79. </tr>
  80. <tr>
  81.     <td>c</td>
  82.     <td>d</td>
  83. </tr>
  84. <tr>
  85.     <td>e</td>
  86.     <td>f</td>
  87. </tr>
  88. <tr>
  89.     <td>g</td>
  90.     <td>h</td>
  91. </tr>
  92.  
  93. </table>
  94.  
  95. <h3>...by percent</h3>
  96. <ul>
  97. <li><h4>percentage width</h4>
  98. <table border = "">
  99. <tr>
  100. <th colspan = 3 width = 100> HEADING</th>
  101. </tr>
  102. <tr>
  103.     <!-- The following cell will be 50% the width of the table-->
  104.     <td width = 50%>Half
  105.     <td>Quarter</td>
  106.     <td>Quarter</td>
  107. </tr>
  108. </table>
  109. <li><h4>relative width</h4>
  110. <table border="">
  111. <tr>
  112. <th colspan = 3 width = 100> HEADING</th>
  113. </tr>
  114. <tr>
  115.     <!-- The following cell will be 50% the width of the table,
  116.     relative to the rest of the element-->
  117.     <td relative_width = 50%>Half
  118.     <td>Quarter</td>
  119.     <td>Quarter</td>
  120. </tr>
  121. </table>
  122. </ul>
  123.    
  124. <h2> Color, since you have been asking...</h2>
  125. <table border = "1" bgcolor=#FF00FF>
  126. <caption><em>Let's change the Background Color!</em></caption>
  127. <tr>
  128.     <td>All</td>
  129.     <td>the</td>
  130. </tr>
  131. <tr>
  132.     <td>same</td>
  133.     <td>colors!</td>
  134. </tr>
  135. </table>
  136.  
  137. <table border = "1" bordercolor="#0000FF">
  138. <caption><em>Let's change Colors!</em></caption>
  139. <tr bgcolor=#FF00FF>
  140.     <td>Some</td>
  141.     <td>are</td>
  142. </tr>
  143. <tr>
  144.     <td bgcolor=#C0C0C0>different</td>
  145.     <td bgcolor=#000000><font color=#FFFFFF>colors!</font color>
  146.     </td>
  147. </tr>
  148. </table>
  149.  
  150. <h2> Pictures in a Table </h2>
  151. <table border = "1">
  152. <tr>
  153.     <!--My image is in the SAME folder as my webpage-->
  154.     <td><img src = "Baby1.png"></td>
  155.     <td><img src = "Baby1.png"></td>
  156. </tr>
  157. <tr>
  158.     <td><img src = "Baby1.png"></td>
  159.     <td><img src = "Baby1.png"></td>
  160. </tr>
  161. </table>
  162.    
  163.    
  164.  
  165. </body>
  166. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement