24

Is there a corresponding HTML entity that represents a whitespace and like this |_|?

2
  • amp-what.com/#q=space => &#x2423, open box - space indicator
    – ndp
    Commented Nov 2, 2012 at 3:07
  • I you need this entity to display consecutive spaces, the css style white-space: pre might be better suited.
    – olejorgenb
    Commented Nov 18, 2019 at 17:58

4 Answers 4

48

Also note   as the entity for space rather than   for non-breaking space.

3
  • 2
    Is there any particular difference between using one or the other? Commented May 29, 2018 at 10:21
  • 6
    The first one adds a space between strings and the second one adds a space between strings and ensures that the strings are kept in one line together with the space.
    – kghbln
    Commented May 30, 2018 at 5:54
  • 1
    @samurai_jane Depending on the font, they might also be different sizes. Commented Sep 6, 2020 at 4:36
46

I think you're looking for a non-breaking space.

 
24

If you mean , it's ␣ ( = ␣ )


Update: above is "open box" character. more accurate symbol might be "shelf" symbol ˽ ˽


Update 2: there is yet another character, counterbore ⌴, but it's rather a technical graphical symbol.

Please note, the you can have some problems with the second symbol "shelf", because it is a modifier symbol.

I'd choose the "open box" .

3
  • Not really a whitespace, but looks like |_| :)
    – erenon
    Commented Jan 4, 2010 at 17:11
  • 1
    yep, something not looking like nothing but something can't be a whitespace :)
    – mykhal
    Commented Jan 4, 2010 at 17:29
  • 1
    Here are a host of them: http://amp-what.com/#q=space
    – ndp
    Commented Nov 1, 2012 at 19:21
10
 

Non-breaking space.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.