lutyi-oleg 3 Posted August 31, 2015 Report Share Posted August 31, 2015 Ну о сервере я не буду писать и так знаете что это. Но вот вопрос никак не пойму, что он от меня хочет вот мой код: <div><img title="Правописание уведомления вебмастера" alt="Правописание уведомления вебмастера" src="/wp-content/uploads/2015/08/konkurs.jpg" border="0" width="250" height="400"><div> А вот ответ валидатора Line 201, Column 226: end tag for "img" omitted, but OMITTAG NO was specified…content/uploads/2015/08/konkurs.jpg" border="0" width="250" height="400"></div> ✉ You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". Line 201, Column 31: start tag was here <div class="execphpwidget"><img title="Правописание уведомления вебмастера" … А вот что у меня в 201 строке: <div class="execphpwidget"><img title="Правописание уведомления вебмастера" alt="Правописание уведомления вебмастера" src="/wp-content/uploads/2015/08/konkurs.jpg" border="0" width="250" height="400"></div> Link to post Share on other sites
VIP vituson 675 Posted August 31, 2015 VIP Report Share Posted August 31, 2015 Может, косая черта в конце? На w3.org код изображения оформлен так: <img src="http://www.w3.org/Consortium/Offices/w3coffice.png" alt="W3C Office logo" /> Валидатор так и пишет: You may have neglected to close an element (закрывающий элемент), or perhaps you meant to "self-close" an element, that is, ending it with "/>" (нужно так) instead of ">" (вместо этого). Link to post Share on other sites
vertas52 143 Posted August 31, 2015 Report Share Posted August 31, 2015 ругается что нет / в конце Link to post Share on other sites
lutyi-oleg 3 Posted August 31, 2015 Author Report Share Posted August 31, 2015 ругается что нет / в конце Точно спасибо Вот что в конце вышло <img src="/wp-content/uploads/2015/08/konkurs.jpg" width="100" height="100" alt="Красивые цветы" /> Link to post Share on other sites
lutyi-oleg 3 Posted August 31, 2015 Author Report Share Posted August 31, 2015 Помогите ещё с одним кодом разобраться - не хватает сил и знания. Вот мой код: <?php wp_list_categories('show_count= 1&title_li='); ?> А вот что на него пишет валидатор Line 177, Column 33: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag <li class="cat-item cat-item-8"><a href="http://мой сайт/sovetyi-vebmasteru/…✉ 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>"). Вот строка 177 <li class="cat-item cat-item-8"><a href="http://мой сайт/sovetyi-vebmasteru/" title="Описание о цветах">о цветах</a> (12 Это код для вывода категорий, так что подобных ошибок много... Как исправить эту не поладочку? Напомню вот сам код вывода в php <?php wp_list_categories('show_count= 1&title_li='); ?> Link to post Share on other sites
rafonets 508 Posted August 31, 2015 Report Share Posted August 31, 2015 <ul> <?php wp_list_categories('show_count= 1&title_li='); ?> </ul> Link to post Share on other sites
rafonets 508 Posted August 31, 2015 Report Share Posted August 31, 2015 (edited) <div><img title="Правописание уведомления вебмастера" alt="Правописание уведомления вебмастера" src="/wp-content/uploads/2015/08/konkurs.jpg" border="0" width="250" height="400" style="border: 0; width: 250px; height: 400px" /></div> У Вас 3 ошибки в первой строчке. Валидный код хорошо, но браузеры от border, width и height для аттрибутов, отказываются, сначала от "TD", от IMG уже заявлено, но пока работают теги. Edited August 31, 2015 by rafonets Link to post Share on other sites
lutyi-oleg 3 Posted August 31, 2015 Author Report Share Posted August 31, 2015 <ul> <?php wp_list_categories('show_count= 1&title_li='); ?> </ul> Спасибо сработал, как нужно. rafonets 1 Link to post Share on other sites
lutyi-oleg 3 Posted August 31, 2015 Author Report Share Posted August 31, 2015 Коль уж начали, давайте продолжим... В принципе больше 70% я исправил сам, но некоторые мне не по плечам - так что помощь зала. Вот мой код: <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation" > <?php if ( function_exists( 'wp_pagenavi' ) ) wp_pagenavi(); ?> </nav> <?php echo $html_id; ?><!--navigation --> Вот что пишет валидатор: Line 566, Column 49: element "nav" undefined<nav id="" class="navigation" role="navigation" >✉ 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 "<frameset>" element), by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (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 строчка 566 <nav id="" class="navigation" role="navigation" > Уже не знаю, как исправить... Link to post Share on other sites
rafonets 508 Posted August 31, 2015 Report Share Posted August 31, 2015 " > - пробел. Link to post Share on other sites
lutyi-oleg 3 Posted August 31, 2015 Author Report Share Posted August 31, 2015 " > - пробел. Не помогло. Он по этому коду ещё некоторые ошибки пишет такие как: Line 546, Column 36: there is no attribute "role"<nav id="" class="navigation" role="navigation" >✉ 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 Он ругается на эту строчку <nav id="" class="navigation" role="navigation" > а это код источник который нужно подправить <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation" > <?php if ( function_exists( 'wp_pagenavi' ) ) wp_pagenavi(); ?> </nav> <?php echo $html_id; ?><!--navigation --> Link to post Share on other sites
rafonets 508 Posted August 31, 2015 Report Share Posted August 31, 2015 У Вас в коде указано XHTML - строгий вариант HTML без ошибок, грубо говоря. Тег NAV из HTML 5 ROLE аттрибут тоже, он ругается на атрибут role, уберите его и не будет ругаться. Но на пробел он тоже ругается ). Link to post Share on other sites
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now