Google's John Mueller says "it's better a site has valid HTML and Short URL"
Addressing to Google's recent update to its panda algorithm, Google Webmaster John Mueller said in a hangout (you can join a hangout with him next week on Friday 12, 2016 https://plus.google.com/events/c8aggn2rcp5a916pv3aj9gq646k find embded below):
"This came up recently with the change of the guidelines, with regards to change made in the webmaster guidelines. We mentioned 'use valid HTML'. The question here is: is the W3C Validation (Broken HTML) ranking factor or should we care about it?
It is not directly a ranking factor. It is not the sense that if your site is not using valid HTML we will remove it from the index. Because I think we will have a pretty empty search results.
But there are a few aspects there that do come into play. On the one hand, a site with really broken HTML, something that we see really rarely, then it is really
hard for us to crawl it and index the content because we can’t pick it up.
The other two aspects which are kind more in regards to structured data. Sometimes it is really hard to pick up the structured data when the HTML is broken completely. So you can’t easily use a validator for the structured data.The other thing is in regards to mobile devices and cross browser support is if you have broken HTML then that is sometimes really hard to render on newer devices"
This means having valid HTML is not a key factor for ranking and if you don't have a site with valid HTML they are not going to penalize you for the broken HTML code. These days Google can handle these types of errors very well. But sometime their crawler fails to render on some devices. Therefore having your site with valid HTML will be a sign of high quality website that cause less issues for search engine crawlers and displays well on all devices.
He has also mentioned that Google now prefers an url having less than 2000 characters. He says:
"You should not go over 2,000 characters in your URLs. There are lots of exceptions there. Different factors that come into play, but everything else being equal, if you have a shorter one and a longer one, we will try to pick the shorter one."
He has also mentioned Google do not re-index images of a site frequently as images don't get changed so often.
Also didn't forget to mention to maintain a proper TITLE TAG. Title tag is most important signal for ranking factor in search result.
Google Webmasters Hangout Live Event Friday, February 12, 2016