要素を<noscript>
要素に入れて、動的コンテンツを表示するためのフォールバックとして有効かどうかを確認していました。これは、HTML 5のdoctypeで細かい検証しますが、HTML 4.01のために、私は次のエラーを取得する:<iframe>要素がHTML 4.01で検証されないのはなぜですか?
Line 9, Column 35: element "IFRAME" undefined
<iframe name="test" src="test.htm"></iframe>You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
- incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "" element),
- by using vendor proprietary extensions such as "" or "" (this is usually fixed by using CSS to achieve the desired effect instead).
- by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
これは私がダウンHTMLを削れものです:要素を定義した
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>I AM YOUR DOCUMENT TITLE REPLACE ME</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div>
<iframe name="test" src="test.htm"></iframe>
</div>
</body>
</html>
次のURLのHTML 4.01仕様:http://www.w3.org/TR/html401/present/frames.html#h-16.5。
これは過渡的なdoctypeで渡されるため、私の質問は「厳格なdoctypeでは、なぜそれが仕様で定義されていても、なぜ許可されないのですか?」です。物事の
恐らく厳密なDTDでは有効ではありません。あなたは過渡期に移行できますか? – Craig
@Craig:W3Schoolsによると、それは大丈夫ですが、それも私が試してみたいものです。 – Mikaveli
@Craig:あなたはそうです、それは過渡的なDTDと共に渡されます - なぜそれは定義されていますが許可されていませんか? @Mikaveli:私はとにかくW3Schoolsページの精度に頼っていません。 – jujurawrs