如何在不使用任何html标记的情况下向html文本添加换行符 [英] How can I add line break to html text without using any html tag

查看:69
本文介绍了如何在不使用任何html标记的情况下向html文本添加换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网站的个人资料文本中插入一个换行符,该文本只允许插入文本,因此我不能使用任何html标记.

I want to insert a line break into my profile text on a website, which only allows text to be inserted, so I can not use any html tag.

我想知道是否有任何方式插入换行符,就像使用ASCII代码插入空格或制表符一样?

I would like to know if there in any way to insert line break just like inserting spaces or tabs using ASCII codes?

推荐答案

没有.您可以输入LINE FEED字符,如
 ,但无济于事:按照HTML规则,它仍将被当作另一个空格字符使用,并且任何空格字符序列都等效于普通HTML内容中的一个SPACE.您不能通过字符本身(仅通过HTML标记或CSS)来覆盖处理字符的HTML规则.

There isn’t. You can enter e.g. a LINE FEED character as 
, but it won’t help: by HTML rules, it will still be taken just as yet another whitespace character, and any sequence of whitespace characters is equivalent to one SPACE in normal HTML content. You cannot override the HTML rules for processing characters by the characters themselves (only by HTML markup or by CSS).

这篇关于如何在不使用任何html标记的情况下向html文本添加换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆