SGML (see [ISO8879], section 7.6.1) specifies that a line break immediately following a start tag must be ignored, as must a line break immediately before an end tag. This applies to all HTML elements without exception.
The HTML standard is actually a bit uncertain about what should be done with spaces in this case, but it clearly states that a line break both after a tag start and before a tag end must be dropped.
Just another one of those annoying little inconsistencies to work around.
Jay