开发者

HTML Version 4 vs 5

Is there a way to avoid HTML 5 parser ? My app has the following doctype:

DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"

And I wish that it's interpreted with HTML4 definitions not HTML5

EDIT:

My question reason is to solve this: Chrome popup Ple开发者_如何学Goase Fill Out this Field


New answer based on updated question:

It isn't the HTML 5 parsing rules you have a problem with, it is support for HTML 5 attributes. No, you can't override this. If you don't want to use things that are new in HTML 5 — don't use them in your document!


Original answer:

No, there isn't.

The HTML 5 parsing rules are mostly "What browsers have been doing for the last decade and a half anyway".

This just lets us get away from having perfectly valid SGML features with limited support in the language (and validators which pass them as valid).


You problem has nothing to do with HTML 4 and HTML 5 (and not even their parsers). It has to do with that fact, that you invented your own non-standard attributes (which you shouldn't have done in the first place), and now new standardized attributes (or attributes in the process of being standardized) are colliding with them.

See also my answer at the your other question.


Thank U All but specially thank to me college who knew how to solve my problem:

http://www.w3.org/TR/html5/association-of-controls-and-forms.html#attr-fs-formnovalidate

You can disable the validation in the form.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜