w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Remove non breaking space from

The only problem that fits these symptoms is that you have a non-breaking space in your source file, which is visually indistinguishable from a regular space. How it might have gotten there is anybody's guess. Perhaps you accidentally hit some key combination that inserted a non-breaking space.

If your editor allows you to examine the code point, then do so (a non-breaking space would be U+00A0). Otherwise, select that little critter and delete it and replace it with a real space.

There is no way, all else being equal, that a space at the beginning of an h4 tag would magically not be subject to standard HTML white space collapsing. People can and should be able to put spaces in places like that, or even put the text on a separate line. It improves readability.

This problem could in theory also be caused by various CSS settings, including margins, text-indent, :before rules, white-space settings, and so on. However, none of these would cause the DOM to indicate a non-breaking space is present. The only conceivable alternative is some client-side script that modifies the element content.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.