I will admit that I have a habit of using
between words when I don't want them to break (table headers for example).
Should I really style my element with white-space:nowrap
? Are there any advantages/disadvantages to either if the only thing I am looking to do is keep words from wrapping?
<span>
s would have any semanticity or accessibility issues (e.g., with screen readers). If a<span>
by default is purely presentational, which I think is the case, there really shouldn’t be any problems with using it. I used to add
s here and there to avoid line breaks in undesirable places, but now I’m probably switching to<span>
s. – Cauley