table

table
HTML table Element
The HTML <table> element is used to construct tables. Tables should only be used in grid layout purposes for tabular content. HTML tables come into play much more when a web developer begins programming with PHP and the likes, and creates a need to render database field data into rows of information for display on a page.

HTML CODE EXAMPLE
<html>
<head>
<style type="text/css">
#myTable {background:#C0D080; border:#6B8336 5px solid; padding:20px; border-spacing:10px;}
#myTable tr{background:#FFF1BF;}
#myTable td{padding:12px; border:#000 2px dashed;}
</style>
</head>
<body>
<table id="myTable"> 
  <tr> 
    <td>Cell 1</td> 
    <td>Cell 2</td> 
  </tr> 
  <tr> 
    <td>Cell 3</td> 
    <td>Cell 4</td>
  </tr> 
</table>
</body>
</html>
 
Cell 1Cell 2
Cell 3Cell 4
Table Tips: It is best to use CSS to style your table from now on, to pad the cells and to create cell space. You will hear some people online say "Never use Tables at all on a website". That is a silly statement because there are times you will require a table if you are a serious web developer dealing with mass data. What they mean to say is: "Try not to use tables to make popular web design 2-column 3-column layouts". To make 2-3 column layouts you can use <div> elements with a CSS "float" attribute placed on the set of divs. That way they will sit side by side horizontally making column layouts for web design. In order to create full page column layouts one should use CSS properties on Div elements for column layouts, by floating the DIVs if that webmaster is able to get the exact box setup they want using CSS.

0 Response to "table"

Post a Comment