Unpadded table
| MIME type |
| text/html |
| text/css |
| image/jpeg |
| text/xml |
| image/png |
| image/gif |
I could add padding using <table border="1" cellpadding="10">, but that put padding at the top and bottom of the text which I didn't want.
Cellpadding
| MIME type |
| text/html |
| text/css |
| image/jpeg |
| text/xml |
| image/png |
| image/gif |
The padding can be specified using
CSS by creating a style section inside the
head section for the page will work to specify left and
right padding in pixels. E.g.:
<style type="text/css">
.padded {padding-left: 10px; padding-right: 10px;}
</style>
Then I could use the following for rows in the table:
<table border="1">
<tr><td class="padded">MIME type</td></tr>
<tr><td class="padded">text/html</td></tr>
...
<table>
Padded class for td
| MIME type |
| text/html |
| text/css |
| image/jpeg |
| text/xml |
| image/png |
| image/gif |
Wrapping the table in a div with padding specified in a style section for that class of div will also work. E.g., for the style section:
<style type="text/css">
.mimetypes td { padding-left:10px; padding-right:10px;}
</style>
And then for the table:
<div class="mimetypes">Table inside div
| MIME type |
| text/html |
| text/css |
| image/jpeg |
| text/xml |
| image/png |
| image/gif |
Created: Saturday March 29, 2014