How do I replicate a \t tab space in HTML?

后端 未结 8 2121
失恋的感觉
失恋的感觉 2021-01-01 12:08

How can I use the common \\t escape character in html ? Is it possible?

I need a code that has the same function as the /t escape character

8条回答
  •  北海茫月
    2021-01-01 12:59

    The same issue exists for a Mediawiki: It does not provide tabs, nor are consecutive spaces allowed.

    Although not really a TAB function, the workaround was to add a template named 'Tab', which replaces each call (i.e. {{tab}}) by 4 non-breaking space symbols:

          
    

    Those are not collapsed, and create a 4 space distance anywhere used.
    It's not really a tab, because it would not align to fixed tab positions, but I still find many uses for it.

    Maybe someone can come up with similar mechanism for a Wiki Template in HTML (CSS class or whatever).

提交回复
热议问题