Apr 21, 2013

Css Html Tips For W3C Markup Validation

Filled under: , ,

The W3C system serves to improve the quality of your blog source code resulting in a better understanding of all media that make reading the code (browsers, smart phones, simulators, web crawlers, etc.). Error checking and help solve conflicts that make a website less
Css Html Tips For W3C Markup Validation
accessible to search engines and browsers.

It is not the intention of this article to teach validate in XHTML, recommending only common faults that can be resolved easily. The tips presented here are suitable to the standards of XHTML Transitional.

An important fact to the code is time to forget not close anything. For this, the ideal is to establish a hierarchy and an order with comments on where it begins and where it ends each zone or div. In XHTML you can not leave anything unlocked. What complicates things is that there are two ways to close an HTML tag:

Never forget the ALT attribute on images. 's important to explain to the search engines what they are images. Something that everyone always forgets to call when an image is to the ALT attribute in it is obligatory, because if the image does not load the text would show ALT (alternative).

Users with visual disabilities use certain systems on their computers reading the ALT attribute and tell them what is that image and, more importantly, is that search engines use to index the images ALT. It is an essential point in the SEO.

Labels can not be capitalized. All tags must be written without CAPS otherwise you will have some optimization failures.

On the other hand, another important element as we said is to respect the hierarchy of HTML. There is a certain hierarchy within the HTML code. For example, the span may not be within the tags P (paragraphs). When you need a little style in certain parts of the text you need to use the

SPAN tag.

This post has a vast content and very thorough. So was divided into parts to explain every detail. It is a very complex issue, but extremely important for your blog:

  • Introduction: about HTML and other code
  • Validating XHTML W3C in your Blog
  • The accused W3C errors in the code of your Blog?
  • My blog does not validate the W3C!
  • Where can I learn more about HTML?

Introduction: about HTML and other code

In the existence of the internet, there were several code languages ​​that only scientists could understand; the internet was used exclusively by them, who used it to communicate.

In the early '90s with the rise of the internet HTML can be used in a simpler way, and any user can manipulate the code and understand. The HTML has since become the most common language for the exchange of information on the internet.
Many people do not know, but the HTML is not a programming language but of marking, where we use it just to mark the text and do the formatting. HTML signified “Hypertext Markup Language ", which translated into Portuguese:" Hypertext Markup Language ".
With the invention of HTML and it being increasingly used, the need arose for its standardization, for each user as well understood and used every browser differently. It was formed when the World Wide Web Consortium (W3C ) in the mid-90s, a consortium that includes members worldwide, from printed private as government agencies.

Cares this consortium of standardization and best practices on the use of languages ​​like HTML, XML, XHTML and even images as PNG, JPG, etc...

XHTML is an invention of the W3C, which is intended to make the language more practical for both those who are developing a project to the web as browsers and search engines.

Just when we started to develop a site in XHTML need to write your DOCTYPE, this is what determines how it will be all the rest of the code in your project, because it is from the browser or search engine will start reading.

Exist in the version of XHTML 1.0 that is the most used models today DOCTYPE:

Strict: It is more restricted form of XHTML, accepts less code (e.g. not accept <center>, inline CSS, etc.), but it is language that makes your code more cleanly, making it easier to read by your browser and motor search.
Transitional: This is the most used, a little more flexible than Strict, accepting more codes also enable clean code.
Frameset: It is no longer used very often; the frameset is for websites created just for iframes.

DOCTYPE example:

<! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

There are also standardizations for HTML 4.01 which meant forms Strict, Transitional and Frameset.

In recent years has released version 5 of HTML, it brings improvements in all senses, the search engines understand much better your blog with HTML 5, the better your indexing information. But some people are on the back foot of the Andes use it because it is something new and older browsers are not able to understand certain things in HTML 5.

But if you have the opportunity to develop using it for sure will be a good investment as I said in this post, the HTML is just a markup language, older browsers will understand your markup, but will not be able to assign CSS styles to these markings, nothing that a little creativity can not solve...

Validating XTHML your blog at W3C.

Validate your blog does not mean that the W3C validated after the code will always be validated, what happens is that the W3C just checks and warns you if everything is ok or if there are errors in your code.

To validate you can use the following link: http://validator.w3.org/

There are 3 options for you to validate your code. Can be validated by the URL (address of your blog), File Upload. Html or simply paste the entire HTML code and send check.

These options are divided by tabs at the W3C Web site:

The W3C will detect your DOCTYPE HTML and make verification through it.

The accused W3C errors in the code of your blog?

Surely many of you do the scan now will feel frustrated because she accused hundreds of errors in your code.

I often say that there are two types of errors in time to validate your site, one is for pure and the other caused by “custom HTML ".

  • Pure: You wrote your code in the wrong way, leaving him broken and ignoring the good practices and the hierarchy of the code.
  • Custom HTML: For certain projects it is necessary to create types of "custom HTML" to JavaScript’s, or PHPs etc, find it that part of the code, bringing certain features. This custom HTML to be not part of the context of the W3C nor browsers and search engines.


Whenever possible avoid using custom HTML, it is not legal for the browser and not for the search engine, as a matter of simple SEO, this kind of HTML will not be well read then it should be avoided.

Tools Blog right here on today, we have 4 errors caused by custom HTML, and two errors are caused by JavaScript counter of Twitter and other two because of the source of the Addthis to share the posts.

Yet had time to develop something to get around this but soon we will be with the code Tools Blog fully validated.

Previously there were over 200 errors, though it seems to be a big improvement is still not our ideal.

As for the W3C already own back tips on how best time of validation (for the custom he will tell you that there is something wrong and who is there). Use these tips to improve your code.

My Blogger does not validate the W3C!

Your Blogger does not validate the W3C because there are some flaws in the source of the service, especially if you use old themes.

Many people do not know, but Blogger was not invented by Google and yes invented by Pyra Labs in 1999 (at that time there were even plans paid for Blogger) only in 2003 that the giant Google bought leaving it completely free.

I believe that in the midst of this transition was left some things behind, leaving the source of some glitches with Blogger and dirt early version, which requires the use of several customs HTML, and template system defaults even have hundreds of errors time to validate.

No use to deceive and think, “If Google is the Google Search will be able to easily read my blog, "Because you are mistaken.

This is not because the result of Google Search is organic and without interference generated directly or indirectly from Google.

As I said in this post, the validation is not just a matter of good practice, but also a question of SEO.

The new versions of templates launched by Blogger had some improvements in this direction too, but much remains to make the appropriate code of good practices W3C.

Always remembering that it is possible to have a quality blog on Blogger.

Where can I learn more about HTML?

The best way to avoid these errors is constant and profound study on best practices and uses of HTML and XHTML.

Strongly recommend that you study this following site:
W3Schools - The best and most comprehensive website on the subject in the world.

3 comments:

  1. These days I am creating my own website and I met with this issue. So I googled to find a better solution for my mother. I can say this article was so effective for my matter. Good work.

    ReplyDelete
  2. Nice blog, i too have blog for my business website made for web designs http://goo.gl/cbc7E.

    ReplyDelete
  3. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information?

    ReplyDelete