Html and css errors - what do SE spiders do if they come across coding errors? Do they stop crawling the rest of the code below the error
-
I have a client who uses a template to build their websites (no problem with that) when I ran the site through w3c validator it threw up a number of errors, most of which where minor eg missing close tags and I suggested they fix them before I start their off site SEO campaigns.
When I spoke to their web designer about the issues I was told that some of the errors where "just how its done" So if that's the case, but the validator still registers the error, do the SE spiders ignore them and move on, or does it penalize the site in some way?
-
Ryan, thanks so much for taking the time to answer, and so comprehensively too, I really appreciate it.
My client came around after I suggested that Getting quality backlinks to a website full of coding errors was like hanging a crystal chandelier in a toilet!! and that they where tying one of my hands behind my back by not sorting it out. Perhaps not the most expert answer but they got the point.
Thanks for some great information and a great answer all round.
-
**When I spoke to their web designer about the issues I was told that some of the errors where "just how its done" **
Are you OK with that response? If your client asked you why you took a course of action on their site would you expect the client to accept "it's just how things are done"?
Generally speaking, sites should use valid code. The W3C is the international body which establishes coding standards. They are made up of a group of people including representatives from Microsoft (IE), Google (Chrome), Mozilla (FireFox), Apple (Safari), etc. Valid code should appear correctly in all browsers.
Generally speaking again, a developer who writes valid code is following best coding practices. The code can be more easily reviewed by other developers. When invalid code is used, it is often due to sloppy coding practices such as not closing tags, using deprecated tags, not being familiar with the particular encoding of the language in use, etc. When I ask a developer why the code is not valid and the response is "it's just how things are done" the translation often is "I lack the knowledge / training / experience to write valid code".
Ok, now that I angered many developers let me take the flip side of the coin. Google.com does not validate. What's up with that? Well, you know the development team at Google is among the best in the world. Their project leaders likely have their doctorate degrees or at least master degrees. Many of them are authors of books on best coding practices. These guys clearly understand all the rules and are able to go past them to achieve better results in a given area, such as speed optimization which Google treasures.
In summary, leading companies can often employee the upper echelon of employees who thoroughly understand the rules and can break them for their benefit. Unfortunately, that does not trickle down to every day developers. Most of them do not have the knowledge / training / experience to make those calls and are simply either using sloppy coding practices or they are not taking the time to research other alternatives. They have deadlines and they jump on whatever works.
what do SE spiders do if they come across coding errors? Do they stop crawling the rest of the code below the error
The results vary based on the Search Engine and the type of error. Here are some examples:
1. There are some errors due to the "&" being used instead of the binary operator "&". Sometimes there are issues with various code where the & character may have another purpose and the interpreter may try to perform an operation on the code such as concatenation rather then simply reading the & as a character.
2. In html,
is a perfectly valid tag. In XHTML, there is a rule that any tags which are not used in a pair should be end in />. In other words, the correct form of the
tag in XHTML is
. If you have an XHTML document which generates 20 errors, and all of those errors are due to the developer using
instead of
then a crawler should handle that issue very well. The crawler recognizes and understands the
tag even though it is technically invalid code.3. An open div tag can cause a variety of issues. It all depends on what operation the div is performing. It could be very minor or a major issue.
Google does a great job of handling invalid code. Bing seems less tolerant of coding errors and much more selective.
A video you will likely enjoy: http://www.youtube.com/watch?v=FPBACTS-tyg
Summary
You should strive for valid code with your site. Coding errors can cause a variety of issues including making it harder for other developers to work on the site, causing the site to appear incorrectly in various browsers or devices, negatively impacting page loading times, and impeding search engine crawlers. It is not possible to say without a review of the specific error. While I do not develop websites, I do project manage the development of many sites. When the site is complete, the goal is to not have any validation errors. If a handful of errors exist, I request for the developer to try to eliminate them. If they cannot, I request an error-by-error explanation of why the error exists and why it cannot be eliminated. The result is a site which appears correctly in all browsers, is correctly crawled and interpreted by search engines, and is easily maintained by various developers.
A final note: just because a page validates does not mean it is developed well, and the reverse is true also. I would say with the exception of the top 1% of sites which are developed by teams of very well trained and experienced web professionals, sites which validate are likely better designed and maintained then sites which do not validate.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Many of my pages are showing up as 4xx errors because they require a login/subscription to view. How can I fix this?
Should these pages be redirecting to a login page? Or does there need to be something other than an Access Denied message? I feel like these are bringing the overall site score down.
On-Page Optimization | | CaraMc0 -
406 Errors from Third-Parties websites In Google Webmaster Tools
Google web master tools is displaying 406 errors page.The source is not from our site domain. How to fix these issues if they are from different domain? 2KXlhRy
On-Page Optimization | | SirishaNueve0 -
Optimize CSS Delivery
Hi, I am loading 3 CSS files here: http://www.viatrading.com/wholesale/9/Domestics.html PageSpeed is telling me I "should fix" the delivery of these CSS Files (see image). I read https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery , but can't figure out which is my case. The CSS are big, but even if I split them in several, all CSS files are still showing up as render-blocking. I moved them to the header/footer, but the message is still appearing. Do you know what might be the problem and how to solve it? Thank you, Screen_Shot_2015_09_10_at_4_44_23_PM.png
On-Page Optimization | | viatrading10 -
On Site Errors
HI Folks I'm monitoring a small Australian site bluetea.com.au . Currently I have a SEO specialist who does month onsite maintenance work for this site. However each month I continue to see errors in webmaster tools... as an example, currently webmaster tools suggest we have 21 short meta dic and 26 duplicate title tags..... Examples given are Short Meta Discp /cleaning-products-and-our-health/toxic-cleaners/ /colour-consultant/fushia-door/ /portfolio/parisian-apartment-black-kitchen/parisian-apartment-black-kitchen/ Duplicate title tags <a id="zip_0-anchor" class="zippedsection_title"></a>concrete-kitchen | Blue Tea Kitchen Designs /kitchen-trends-and-material-innovation/concrete-kitchen-2//kitchen-trends-for-2013/concrete-kitchen/<a id="zip_1-anchor" class="zippedsection_title"></a>Potts Point Kitchen | Blue Tea Kitchen Designs/portfolio/potts-point-kitchen//portfolio/potts-point-kitchen/pott-point-kitchen/My SEO tells me that he has solved all these issues but after one or two months they still remain in webmaster tools... can anybody help me understand why?Thank you
On-Page Optimization | | PHD0 -
Html to wordpress
I have an html site and most of my pages are ranking well. I want to switch to wordpress but i am afraid that i will loose ranking on my inner pages. Any thoughts? And should i do a redirect or use a html plugin
On-Page Optimization | | benjaminmarcinc0 -
Changing Subfolder that has been crawled before
Question: I am using a wordpress multisite and I enabled the crawl options yesterday www.abc.com/subfolder <-original but i find that www.abc.com/sub is good enough I checked the site:abc.com but I find that my pages in the /subfolder has been crawled before. Can I just change it to www.abc.com/sub or it will raise duplicate content issue?
On-Page Optimization | | joony20080 -
SERP - Hi How come I get different results on page one of Google with the same query from my colleague who sits next to me? We are both logged out of Google and it’s on google.co.uk thanks in advance Daniel
Hi How come I get different results on page one of Google with the same query from my colleague who sits next to me? We are both logged out of Google and it’s on google.co.uk thanks in advance Daniel
On-Page Optimization | | ds80 -
External vs inline for CSS menu
Which is better for search engines: external or inline menus? And which language: CSS, Javascript, or both?
On-Page Optimization | | teatable0