Jump to content
  • 0

Как исправить эти ошибки?


midzus
 Share

Question

Подскажите как исправить

# Error Line 112, Column 66: Attribute "target" exists, but can not be used for this element.

…e.ua/ru/currency/converter/" target="_blank"> Валютный конвертер</a> <a

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. 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 "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

# Error Line 211, Column 49: document type does not allow element "a" here

…te("<a href='http://www.hostcms.ru/'><img src='http

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

# Error Line 211, Column 137: Attribute "border" exists, but can not be used for this element.

….php?"+path+"&counter=0' border='0' alt='HostCMS Counter' width='1' heigh

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. 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 "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

# Error Line 212, Column 52: document type does not allow element "a" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

…ipt><a href='http://www.hostcms.ru/'><img src='http:/

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

# Error Line 261, Column 49: document type does not allow element "a" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

…p://www.bigmir.net/" target="_blank"><img src="http://c.bigmir.net/?v16801996

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

# Error Line 266, Column 217: document type does not allow element "img" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "address", "fieldset", "ins", "del" start-tag

…"" width="1" height="1" border="0" /></noscript>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Edited by midzus
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Имхо, если дорог строгий XHTML-доктайп, то самый верный способ — выкинуть на помойку эти попсовые счетчики с document.write и прочими анахронизмами. Все равно при правильном Content-type их работу никто не гарантирует...

Link to comment
Share on other sites

  • 0

# Error Line 112, Column 66: Attribute "target" exists, but can not be used for this element.

…e.ua/ru/currency/converter/" target="_blank"> Валютный конвертер</a> <a

target - вне закона.

# Error Line 211, Column 49: document type does not allow element "a" here

…te("<a href='http://www.hostcms.ru/'><img src='http

Я так понимаю - там write? При XHTML 1.0 Strict нельзя.

# Error Line 211, Column 137: Attribute "border" exists, but can not be used for this element.

….php?"+path+"&counter=0' border='0' alt='HostCMS Counter' width='1' heigh

Непонятно к какому элементу - вынесите в стили.

На остальное, вот так с напора не скажу - надо страницу смотреть.

Link to comment
Share on other sites

  • 0
target - вне закона.

В HTML 4.x Strict, XHTML 1.0 Strict и первой редакции XHTML 1.1. В любой Transitional-разновидности, в новой редакции XHTML 1.1 и в HTML5 — можно.

...write? При XHTML 1.0 Strict нельзя.

В любом XHTML, имхо... как минимум нежелательно. Это историческая фича сугубо для text/html, при application/xhtml+xml она работать вовсе не обязана (хотя большинство реальных браузеров стараются поддерживать, ради совместимости с такими вот счетчиками и т.п.). А делать XHTML исключительно для отдачи как text/html, имхо, не очень логично...

Непонятно к какому элементу

Судя по всему, к картинке счетчика.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy