NET-enabling start-tag requires SHORTTAG YES

老子叫甜甜 提交于 2019-12-10 20:34:10

问题


Trying to get close a W3C validation of the output from my aspx (VB.NET 2008 Framework 3) I get this warning:

Warning Line 6, Column 76: NET-enabling start-tag requires SHORTTAG YES

</title><meta http-equiv="content-type" content="text/html; charset=utf-8" />

The sequence can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag '). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

But... in my source editor from visual I can see this:

    <meta http-equiv="content-type" content="text/html; charset=utf-8">

And after loading the page, and viewing the source code in Firefox, I can see this:

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

Why can be happens this?

Thanks


回答1:


ASP.NET will vary the output by user agent. You can try some of the ideas presented in Making asp.net 2.0 play nice with the W3C validator and see if they work for you.



来源:https://stackoverflow.com/questions/9503690/net-enabling-start-tag-requires-shorttag-yes

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