Practical and Useful Information For Enhancing Your Site

Unwanted Spaces Between Images

Some browsers interpret invisible hard returns/linefeeds in an HTML editor as spaces. For example, you might want three images placed horizontally on a page without any space between the images. Code like this:

<img src="assets/red.gif" width="100" height="100" />
<img src="assets/green.gif" width="100" height="100" />
<img src="assets/blue.gif" width="100" height="100" />

Could give you a result like this:

However, if you place your code on a single line, like this:

<img src="assets/red.gif" width="100" height="100" /><img src="assets/green.gif" width="100" height="100" /><img src="assets/blue.gif" width="100" height="100" />

You will get a result like this: