What is the difference between   and  ?

前端 未结 2 1557
孤独总比滥情好
孤独总比滥情好 2021-01-03 20:05

I have written one XSLT to transform xml to html. If input xml node contains only space then it inserts the space using following code.

&         


        
相关标签:
2条回答
  • 2021-01-03 20:27

    It's the same. It's a numeric character reference. A0 is the same number as 160. The first is in base 16 (hexadecimal) and the second is in base 10 (decimal, everyday base).

    0 讨论(0)
  • 2021-01-03 20:47

      is a non-breaking space ( ).

      is just the same, but in hexadecimal (in HTML entities, the x character shows that a hexadecimal number is coming). There is basically no difference, A0 and 160 are the same numbers in a different base.

    You should decide whether you really need a non-breaking space, or a simple space would suffice.

    0 讨论(0)
提交回复
热议问题