this question involves doctype so I won't be using JFiddle because there the doctype is automatically included
you can copy and paste into a file.html and run it though
I'm using to display some information and I when I use it without using a doctype declaration it works fine (no vertical spacing between the span elements)
<html>
<style>
span {
font-family:sans-serif;
font-size:9px;
color:#666666;
}
#statusPass {
color:#66CC00;
}
#statusFail {
color:#FF0000;
}
</style>
<body>
<span>process... </span>
<span id="statusPass">pass<br /></span>
<span>process... </span>
<span id="statusFail">fail<br /></span>
</body>
</html>
However if I add a doctype tag it seems to automatically add vertical spacing between the spans, I'm not sure why but it there a way to remove it?
<!DOCTYPE html> <!-- this guy's the culprit -->
<html>
<style>
span {
font-family:sans-serif;
font-size:9px;
color:#666666;
}
#statusPass {
color:#66CC00;
}
#statusFail {
color:#FF0000;
}
</style>
<body>
<span>process... </span>
<span id="statusPass">pass<br /></span>
<span>process... </span>
<span id="statusFail">fail<br /></span>
</body>
</html>