This may or may not work for your situation, but you can use elements like <li> and <dl><dt><dd>
which have an optional closing tag. The browser adds the closing tag for you and also has the effect of removing white space!
Reference - HTML: Include, or exclude, optional closing tags?
Check this Fiddle
http://jsfiddle.net/by0sw7kc/
HTML
<ul>
<li><a href="some link">A link</a>
<li><a href="some link">A link</a>
<li><a href="some link">A link</a>
<li><a href="some link">A link</a>
<li><a href="some link">A link</a>
</ul>
CSS
ul {
background: red;
padding-left: 0;
}
li {
background: deepSkyBlue;
display: inline-block;
}