How to stop Browser from replacing multiple space by single space?

后端 未结 5 1661
迷失自我
迷失自我 2020-12-11 16:00

Browser is replacing Multiple space between words to the single space in html page. for e.g if my text is \'AB-DC 3\' in Browser its showing \'AB-DC 3\'<

5条回答
  •  清歌不尽
    2020-12-11 16:11

    If you give so many spaces in html it is of no use because browser will consider only one you have to use space entity   the no. of times you type this entity browser will so that much spaces

    HTML:

    He    llo

    It will show exact 4 spaces in the work

    Here is the fiddle link https://jsfiddle.net/yudi/zrqrfw98/

提交回复
热议问题