Menu

The Web Isn't Valid Anymore, And That's Not Ok

The Web Isn't Valid Anymore, And That's Not Ok

The language of the internet is and always will be HTML. And this HTML is standardized by the W3C, or the World Wide Web Consortium. The W3C is made up of organizations and a full time staff and their job is to come up with the rules that everyone should follow, in order to get websites to work pretty much. And a long time ago, most websites abided by these rules. Web pages were simple, and browsers were less forgiving. If you missed a closing tag somewhere, you were gonna know it. Nowadays however, the web has turned into a much more complex structure, and this validation is both more difficult and more of a nuisance to web developers. So today, I'll go over the problems with web validation, the importance of it, and whether it really matters or not in the grand scheme of the internet life.

About Complexity

A decade ago websites were made up of static HTML with a splash of JavaScript, include files, inlined CSS and not much else. It was a simpler time then, but also not one that was very useful. Static websites couldn't do much besides present data to a user. Nowadays websites are more dynamic and require multiple frameworks and programming languages, and ads, we can't forget ads.

Just recently I was doing an audit on my own websites and noticed that some weren't valid, again. It usually happens every couple of months. I make changes and updates and sometimes I end up using 3rd party libraries to get things done. And in that process, I not once check to make sure that my work is valid HTML. Not on purpose, but rather forgetfulness. And here were the results.

The Web Isn't Valid Anymore

Personally, I hate seeing those messages. And I won't bother to show the 36 that followed after. Needless to say, it's a fair amount of work to dive back into this project and to clear up each error line by line. It's possible, but it might not be the best use of time really since the results will look exactly the same. And because the results are indeed the same, is it really that big of a problem?

Is It A Problem?

So if no one is working with valid HTML anymore, is it really a big problem, is the question. Well, technically, not really. Almost no website currently is completely HTML valid, except for this blog, because I made sure to clear every single error that the W3C Validator pointed out to me before I started to write this post.


The Web Isn't Valid Anymore

Even Google has admitted that having valid HTML isn't really a factor in their search algorithm. But their reasoning is sound and I for one am glad they don't. Their logic being that websites shouldn't be penalized for having typos in their markup, if their content is of high quality. Which makes sense. If they took validity and added it into their formula, then thousands of the most popular sites today, probably wouldn't be as popular.

And if Google telling us that it isn't all too important isn't enough, here is the W3C's official site running against their own validator.

The Web Isn't Valid Anymore

So if the biggest website in the world and the entity in charge of the validity of this content are telling us that this isn't important, should we just give in and completely forget about having our markup make sense and start making up our own?


<large>
    <blurry>blurry text</blurry>
</large>

Maybe not just yet.

Why Validation Is Important

The only real issue that comes with having invalid markup is that rendering engines will treat the markup differently. Which will inevitably lead to a developer adding tons of CSS in order to correct the issue across the many different browsers. I've seen this time and time again at different companies where I've worked. I've known many junior developers that didn't know this was invalid:


<ul>
    <li></li>
    <div></div>
    <li></li>
</ul>

It's not a massive issue, except for the fact that in order to get it to render normally, it's going to require a few CSS hacks, and if you do this enough times, and then hand off the project to someone else, someone that's perhaps a bit more knowledgeable, that's when it becomes a problem.

The way that the internet goes nowadays this is essentially inevitable. Many different developers work on websites using many different tools. Many times, those tools will render a different HTML output. So the odds of having a 100% flawless website is almost nonexistent. The reason that web validity isn't as important anymore, is because browsers are incredibly forgiving nowadays. You can embed a tags and it will render just fine. You can forgot to close tag after tag, and more than likely Chrome will render your content just fine.

#MakeTheWebValidAgain

And thus, web validity has become a thing of the past. A lost art really. A mere "suggestion", if you will, as to what your website should do, but it's okay if you don't.

But, and this is my personal opinion time, maybe it's not just "ok" to throw this under the rug because it's just "too tough" to get right. If the Los Angeles Times wrote articles that were filled with typos and such without any kind of editing, people would quickly abandon it as a valid news source. But they don't. They have editors, that cross every last 't' and dot every last 'i', because those small details have a bigger impact in the end.

A website with valid HTML shows a higher level of care that is taken into the sites development. It shows that the web developer went that extra step to make sure that everything was compliant. Overall this offers better usability, because more browsers will be able to parse the intended data the way it was intended to. And it's a shame that this isn't respected more by developers, search engines and even browsers in this day and age.

Walter G. author of blog post
Walter Guevara is a Computer Scientist, software engineer, startup founder and previous mentor for a coding bootcamp. He has been creating software for the past 20 years.

Get the latest programming news directly in your inbox!

Have a question on this article?

You can leave me a question on this particular article (or any other really).

Ask a question

Community Comments

No comments posted yet
Ad Unit

Current Poll

Total Votes:
Q:
Submit

Add a comment