开发者

How does Tidy handle self-closing tags

I run tidy as a plugin in gedit.

It uncloses self-closing开发者_JAVA百科 tags like <br> and <img>

e.g. <br /> goes to <br> and <img src="somewhere" /> goes to <img src="somewhere">

Can I make tidy in gedit respect these self-closing tags or should I not be using these tags?


In HTML, those elements shouldn't have a self-closing / at the end.

If you don't need to be using XHTML (and it sounds like you don't) then I would just use an HTML doctype and let Tidy do what it's already doing. Otherwise, you need to tell Tidy that you want it to use XHTML rules instead of HTML rules

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜