I hate HTML
I'm not sure about other developers, but I hate working with HTML. Here's an example why…
I have a few images that need to be arranged in a table to show a page header. This simply is just some IMG tags inside some other TD tags. But whenever the header is displayed in IE, there are always extra pixels at the bottom of each TD with an image inside of it. I tried setting the paddings and margins for the TD's to zeroes, but that didn't work. If I set the image as the TD background, then the extra pixels goes away. But I can't use this workaround because there are times when I need to display an image in a TD then set some other image as a background. It took me days to figure out the cause of this problem:
When I type HTML, I like to add extra white spaces so that it's readable and therefore easier to maintain. And so the HTML for the above scenario looks like:
<table>
<tr>
<td>
<img src=”some image/>
</td>
</tr>
</table>
I thought that browsers will just ignore the extra white spaces, but apparently, that isn’t true. IE adds extra pixels to the TD whenever you add the extra space after the IMG tag. In order to fix the problem described above, I had to change the HTML to this:
<table>
<tr>
<td><img src=”some image/></td>
</tr>
</table>
Comments
- Anonymous
April 27, 2008
I think EVERY last one of us hates HTML at this point.