Definition of HTML whitespace rules?

笑着哭i 提交于 2019-11-28 01:05:53

I think the section 9.1 White space in the HTML 4 specification is what you’re looking for.

So I think the closest I'm going to get for an answer on this is here: http://www.w3.org/TR/CSS2/text.html#white-space-model

If you're writing your own HTML parser, then I strongly recommend you use the parsing algorithm in the HTML 5 spec. http://www.whatwg.org/html5 It covers a large number of edge and corner cases, and general browser weirdness. Browsers don't follow SGML rules, but they are all homing in on either doing what the HTML 5 spec says, or the functional equivalent of it. There are several open source parsers available that implement the algorithm, so it should have everything you need.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!