Mobile app version of vmapp.org
Login or Join
Kevin317

: Cannot solve errors on W3C validator I have found a webpage that can check for errors in my webpage's code. Here are the errors I couldn't solve: End of file seen and there were open

@Kevin317

Posted in: #Html #Php #Seo #W3cValidation

I have found a webpage that can check for errors in my webpage's code. Here are the errors I couldn't solve:


End of file seen and there were open elements. Unclosed element div.
<div id="wrapper">

The language attribute on the script element is obsolete. You can safely omit it.

…e="text/javascript" src="http://counter.top.ge/cgi-bin/cod?100+91585">

The character encoding specified in the HTTP header (utf-8) is
different from the value in the element (utf-8, utf-8). I will
use the value from the HTTP header (utf-8) for this validation.


Here are the error sources:

<?php wp_footer(); ?>
<!-- TOP.GE COUNTER CODE -->
<script language="JavaScript" type="text/javascript" src="http://counter.top.ge/cgi-bin/cod?100+91585"></script>
<noscript>
<a target="_top" href="http://counter.top.ge/cgi-bin/showtop?91585">
<img src="http://counter.top.ge/cgi-bin/count?ID:91585+JS:false" alt="TOP.GE" ></a>
</noscript>
<!-- / END OF COUNTER CODE -->

<script id="_wauzua">
var _wau = _wau || []; _wau.push(["classic", "y33h0fn9o7nq", "zua"]);
(function()
{var s=document.createElement("script"); s.async=true;
s.src="http://widgets.amung.us/classic.js";
document.getElementsByTagName("head")[0].appendChild(s);})();</script>


One more for the wrapper:

<body <?php body_class() ?>>
<div id="wrapper">
<header id="header">
<<?php pinboard_title_tag( 'site' ); ?> id="site-title">
<?php if ( ( '' != get_header_image() ) && ( false != get_header_image() ) ) : ?>
<a href="<?php echo home_url( '/' ); ?>" rel="home">
<img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" width="<?php echo ( pinboard_get_option( 'retina_header' ) ? absint( get_custom_header()->width / 2 ) : get_custom_header()->width ); ?>" height="<?php echo ( pinboard_get_option( 'retina_header' ) ? absint( get_custom_header()->height / 2 ) : get_custom_header()->height ); ?>" />
</a>
<?php endif; ?>
<a class="home" href="<?php echo home_url( '/' ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</<?php pinboard_title_tag( 'site' ); ?>>
<?php if( ! is_active_sidebar( 1 ) ) : ?>
<<?php pinboard_title_tag( 'desc' ); ?> id="site-description"><?php bloginfo( 'description' ); ?></<?php pinboard_title_tag( 'desc' ); ?>>
<?php endif; ?>
<?php get_sidebar( 'header' ); ?>
<div class="clear"></div>

</header><!-- #header -->


Will the improvement of these errors help my SEO?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin317

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

Solving validation errors in your site's HTML code will NOT help your rankings in search engines.

Here is a video where Matt Cutts weights in on the situation:


Matt: Hi. We have a guest to answer today’s webmaster video question. The question comes from Jimmy @Feldon , Wirsberg. Nice job getting your Twitter handle in there by the way. Jimmy asks, “Hi Matt. In a previous video, you stated that validation of HTML wasn't really important for ranking or SEO. This confuses me. Wouldn't Google really want to send its users to websites which would be broken for a lot of them?” Danny, how would you answer that?

Danny: Well, a lot of websites can have invalid code but actually render just fine, because a lot of modern browsers do a good job dealing with bad code. And so, it’s not so much that the code has to be absolutely perfect, but whether or not the page is going to render well for the user in general. So it makes sense to still list these websites; it makes sense not to be that specific. And plus, people make a lot of mistakes because they’re using different HTML editors, or maybe they’re doing some hand coding. They’re little tiny things that aren't going to have that big of an impact. If you were trying to be very very specific, I suspect– and Google would certainly know– but you’d have a lot of websites that would be left out for no good reason because they would still be validating just perfectly fine.

Matt: You were even joking a little bit about this.

Danny: I did. So, for example, in this question, there’s a grammatical error that’s in it, and I can understand what the question is about perfectly well. But if I were going to invalidate even taking questions based on them being perfectly grammatically correct, then it would be lost. In that case, if you will, Google can both understand and deal with pages that are perfectly grammatically correct, and perfectly HTML correct, and it can also understand when you're being a little more casual. Because basically it understands what the page is about.

Matt: So, Danny nailed that. I don’t really have much to add, other than usually if a page doesn't validate, it still can look perfectly fine in the browsers, which is exactly what you said at the very beginning. So, great question. Thanks for sending it in.

10% popularity Vote Up Vote Down


 

@Hamaas447

From the error and the code posted, the unclosed element is obvious:

<body <?php body_class() ?>>
<div id="wrapper">
<header id="header">
<<?php pinboard_title_tag( 'site' ); ?> id="site-title">
<?php if ( ( '' != get_header_image() ) && ( false != get_header_image() ) ) : ?>
<a href="<?php echo home_url( '/' ); ?>" rel="home">
<img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" width="<?php echo ( pinboard_get_option( 'retina_header' ) ? absint( get_custom_header()->width / 2 ) : get_custom_header()->width ); ?>" height="<?php echo ( pinboard_get_option( 'retina_header' ) ? absint( get_custom_header()->height / 2 ) : get_custom_header()->height ); ?>" />
</a>
<?php endif; ?>
<a class="home" href="<?php echo home_url( '/' ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</<?php pinboard_title_tag( 'site' ); ?>>
<?php if( ! is_active_sidebar( 1 ) ) : ?>
<<?php pinboard_title_tag( 'desc' ); ?> id="site-description"><?php bloginfo( 'description' ); ?></<?php pinboard_title_tag( 'desc' ); ?>>
<?php endif; ?>
<?php get_sidebar( 'header' ); ?>
<div class="clear"></div>

</header><!-- #header -->
</div> <!-- #wrapper is closed by adding this closing tag-->


For the other message, instead of <script language="Javascript" type="text/javascript" src="... > just use <script src="...> because script tags are assumed to be JS with a 'type' of javascript.

This is probably a question better suited for simply typing it into Google (the error and warning could be much clearer) and if that fails for Stack Overflow as they deal with code.

The HTTP headers vs. meta are pretty simple to figure out too, I'll leave that much up to you.

As for SEO, 'quality' is a growing ranking factor. I don't know that these 2 things specifically would have much impact but having valid, concise, compact, high-quality code probably would offer some benefit--though defining that would be nearly impossible.

My totally unsupported gut feeling is that code quality is likely part of a holistic evaluation of your site by the more advanced search engines.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme