Spaces Between Images in HTML

How to Remove the Small Spaces Between Images on a Web Page

This article deals with removing the small strips of space that can appear between two pictures placed onto a web page. It is easy to fix and you can use this article like a tutorial as example code is given.

A Basic Web Page with Two Images

A web page can be created in a simple text editor program, on a Windows PC the Notepad program under Accessories can be used, or better still a program like Notepad++ which provides color coding to help with the editing process. This is some basic code for a web page with two images:

The above code produces this web page that clearly shows a gap between the two images:

Space shown between HTML images

The reason for this space is due to the way that HTML is designed to handle whitespace. Continue reading