hlor
25.12.2008, 11:26
Можно ли заставить typo генерировать тэги в формате <foo> вместо <foo />?
Вот, что говорит валидатор про сабжи:
…content="text/html; charset=windows-1251" />
The sequence <FOO /> 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 <FOO (with an implied '>'). 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.
Это ворнинг, далее в этой же строке ошибка:
…content="text/html; charset=windows-1251" />
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
* putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
* forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
* using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character.
да, доктайп <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Вот, что говорит валидатор про сабжи:
…content="text/html; charset=windows-1251" />
The sequence <FOO /> 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 <FOO (with an implied '>'). 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.
Это ворнинг, далее в этой же строке ошибка:
…content="text/html; charset=windows-1251" />
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
* putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
* forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
* using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character.
да, доктайп <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">