For ordinary page layout, use CSS—not whitespace characters—to create a visible gap. Use margin for space outside an element and padding for space inside its box. The title “Invisible spacer?” does not reveal what the original SitePoint poster meant, so this is guidance for the likely layout question, not a verified account of that thread.
Choose margin or padding based on where the space belongs
- Use margin when the gap should sit outside an element, separating it from neighboring content. MDN describes margins as extra space around an element, unlike padding, which adds space within it: MDN’s margin reference.
- Use padding when the space should sit between an element’s edge and its content—for example, inside a bordered or colored container. See MDN’s padding reference.
For example, to separate consecutive sections, apply margin to the later section:
<div class="section">First section</div>
<div class="section">Second section</div>
.section + .section {
margin-block-start: 1rem;
}
This CSS creates space before each section that follows another section. It is a practical example, not code recovered from the forum discussion.
Check the layout context if spacing does not appear
Margin behavior depends on the element and its layout context. In particular, MDN notes that top and bottom margins do not affect non-replaced inline elements such as span and code. If you need vertical spacing around inline content, consider whether the element should participate in a different layout, or apply spacing to a suitable containing element.
#1 Best Overall
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
Vertical margins can also collapse in some normal-flow layouts, so the visible gap may not equal the simple sum of adjacent margins. If a result is unexpected, inspect the surrounding elements and their layout rules rather than inserting a blank character.
Distinguish layout spacing from invisible text characters
A visible blank area that needs to reserve layout space is a CSS layout concern. Unexpected wrapping, odd text-processing results, or a gap embedded in copied text may instead come from an invisible character. U+00A0, for example, is a non-breaking space, but there is no evidence that the SitePoint thread was about that character.
Rank #2
When text behaves strangely, inspect the actual characters or code points in the content. Do not assume that an invisible character is the right way to create a visual layout gap.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What is known about the SitePoint question
The original discussion, its code sample, browser details, and accepted answer could not be verified. The title alone does not establish whether the poster meant CSS spacing, a special HTML feature, or an invisible character. The HTML Standard’s obsolete features section is relevant when checking a particular legacy HTML feature, but the title does not identify one.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Quick Recap
Best Value
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

