DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Avoid Visible Whitespace In Html

09.25.2006
| 3472 views |
  • submit to reddit
        // if you want a line break and want to indent your html code 
// but the browser makes problems with the whitespace
// make the whitespace a comment

//example
<div id="topimages">
	<image class="left" src="image/left.jpg"><!--
	--><image class="left" src="image/mid.jpg"><!--
	--><image class="right" src="image/right.jpg">
</div><!--topimages-->