Tables & CSS Formatting
You may have noticed that there are a lot of deprecated attributes in relation to tables. Many have asked how to validate with this happening. The solution: put all your formatting in your CSS (style sheet) file, or in your <style> tags. Below is an example how to do this for a basic table setup.
All attributes below are just examples, customize to suit.
HTML File:
<table class="one">
<tr><td>
text/image</td><td>
text/image</td></tr>
<tr><td>
text/image</td><td>
text/image</td></tr>
<tr><td>
text/image</td><td>
text/image</td></tr>
<tr><td>
text/image</td><td>
text/image</td></tr>
<tr><td>
text/image</td><td>
text/image</td></tr>
<tr><td>
text/image</td><td></td></tr>
</table>
CSS File:
table.one {
width: 80%;
border: 0.05em #6699CC solid;
border-collapse: collapse;
}
table.one td {
text-align: center;
font-family: Arial, Helvetica, Verdana, sans-serif;
font-weight: normal;
font-size: 0.80em;
color: #404040;
width: 50%;
background-color: #fafafa;
border: 0.05em #6699CC solid;
border-collapse: collapse;
}
End Product:
.