When i designing my site i came across a two empty space need for an alignment and i had use Alt+0160 for that and it looks fine and good. But i need to know that is this way legal for designing?
preguntado el 02 de febrero de 12 a las 10:02
It may look fine in your browser, with your specific font settings, but awful in other environments.
No, don't use characters for styling.
In html you should use non-breaking space. You can code it using
or , but try to use css instead of nbsp to style your website. It should behave better in all browsers. :)
The page does not contain Alt+0160. It contains the NO-BREAK SPACE character (U+00A0) generated by the key combination Alt+0160 on Windows. The character is valid and often useful, but using it for visual formatting is usually not a good idea, partly because CSS lets you affect the formatting in much more fine-grained way.
When you use NO-BREAK SPACE, then using the character itself (as opposite to
) has the benefit and disadvantage of looking like a space in HTML source in most programs that you use for viewing it. It makes the content look cleaner, but it is difficult to notice when you need to (or debemos) pay attention to different space characters.
Tiendo a evitar
, but it is a legal character and you won't face any issues because of it. I do, however, feel that using CSS's
text-indent, etc (depending on what you're trying to accomplish) is a much neater way of doing the same thing.
If you do use it, I would recommend using
en lugar de
Alt+0160 to make it clear that you are using them.