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
-
Unsolved Moz is showing a canonical error that dont belong.
Hi guys, and thanks for this excellent source of information. i have an issue with the moz system because is telling to me that i dont have canonical instructions but i have canonical instructions on all my pages, so... im confused because maybe im not understanding what the system want to show to me. if you can help me i will be very gratefull. here you can see a page that have the canonical instruction. https://drive.google.com/file/d/14U_-Sgu_NQaB7kMBH3AguHQMHyHX9L8X/view?usp=sharing and here you can see what is reporting to me the MOZ system. https://drive.google.com/file/d/1pqgSC-V9WOyBPvQEr06pbqpLf_w7-q8J/view?usp=sharing this is happening on 19 pages, and all the 19 pages have the canonical instruction.
On-Page Optimization | | b-lab
thanks in advance guys.0 -
When making content pages to a specific page; should you index it straight away in GSC or let Google crawl it naturally?
When making content pages to a specific page; should you index it straight away in GSC or let Google crawl it naturally?
On-Page Optimization | | Jacksons_Fencing0 -
I have more pages in my site map being blocked by the robot file than I have being allowed to be crawled. Is Google going to hate me for this?
Using some rules to block all pages which start with "copy-of" on my website because people have a bad habit of duplicating new product listings to create our refurbished, surplus etc. listings for those products. To avoid Google seeing these as duplicate pages I've blocked them in the robot file, but of course they are still automatically generated in our sitemap. How bad is this?
On-Page Optimization | | absoauto0 -
Crawl erros I don't understand
Hi all, after my website is crawled SEMOZ has alerted me about some errors (28 exactly) with the same problem: http://piensapiensa.com/servicios/talleres-para-docentes/taller-sobre-como-motivar-a-los-alumnos/Piensa_Piensa 404 : Error At the end of the URL you can see "Piensa_Piensa" which I haven't added at all. It's present in all URLs that have reported as error by SEOMOZ. The CMS that has been used to create the website is wordpress. what does it mean? Many thanks
On-Page Optimization | | juanmiguelcr0 -
404 errors on page urls that don't even exist
The Seomoz crawler found 404error of pages dont even exist. Ho can that be possible?? Pages like: URL: http://www.yoxo.it/catalog/seo_sitemap/category/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/falli/
On-Page Optimization | | yoxo0 -
Efficient CSS Selectors
How much practical impact do inefficient CSS selectors have on page speed?
On-Page Optimization | | casper4340 -
Will google see you bold/emphasis words if done in css?
We do not use header tags in our website. I understand bolding or emphsising words can be equally as effective but if done so in css will the google crawlers and spiders etc be able to put a weighted value on this style of code???
On-Page Optimization | | gsbureau0 -
I think my site's HTML is good but I get 22 Invalid markup erros?
Most are all related to things like facebook like buttons and such. I'm using DOCTYPE 4.01 Traditional but no good. Any ideas? www.jaaron-wood-countertops.com
On-Page Optimization | | JAARON0