Jump to content
xisto Community
Sign in to follow this  
iGuest

Valid HTML - And Search Engine Rankings!

Recommended Posts

It is told that valid HTML code is the 'right' way to build website. It is also said that valid HTML allows for greater accessibility, cross-browser compatability, and might effect search engine rankings.

I have got a link wherein you can validate your site for right HTML. It is here.This is the W3C Markup Validation Service, a free service that checks Web documents in formats like HTML and XHTML for conformance to W3C Recommendations and other standards.

Share this post


Link to post
Share on other sites

It is always good to validate your html, for the same reasons it was said above, but sometimes when you run scripts such as php, you can get content which might not be valid, fixing this kind of content will be a pain to use, so that is why I recommend to use tidy html on your computer even if you're offline. Some browsers do this, some only with addons.But if you're working with some scripting/programming language which outputs html, you better use/find an editor which will look up the content for errors, css/rss/html - really comfortable, especially if you have a quite big software written in some language, it would be a pain to check everything when you finished, online through the w3c.But note; that don't try to be always valid, because some things you're using never will be valid, because it is not the standard, but I always try to move to the best alternative. For example HellFire121's title page which I just checked has some errors he would rather fix and nothing will change. :PSome people usually say that they don't validate their html, because they say: check google, they are not a valid site, so what ? it does not link to w3c and if you check their source, their main objective is to make it cross-platform friendly and to use as less bandwidth as possible, so they don't use some stuff. Furthermore, modern browsers try to fix the mistakes made by the webmaster to show the content as better as possible, but sometimes this thing is painful, due to you can't see your own errors, but some browsers, usually older has a select box how to show the source, strictly/compatible/etc. :o

Share this post


Link to post
Share on other sites

The key is to write valid (X)HTML/CSS from the start, instead of developing your site then fixing it after it's been completed. This also helps when scripting too, making sure that what you output dynamically is also valid.As for search ranking, it may improve your rank, because you're capable of accepting a much wider audience if your site is accessible for everyone, which may bring you more traffic because you cater for everyone's needs.Most companies don't even care about having a site that conforms to standards, but if you can tell them how valid (X)HTML/CSS can increase their revenue, lower their expenses and draw in more customers and in the long run, make it easily maintainable, then you'll be doing a lot better than most the web designers I've come across.Just remember, comply to the standards, and try to keep it valid, there might be some things that don't validate that you use, I'm positive there would be an alternative to it, because I've rarely come across many problems in my time, but I do await CSS3 which will make creating sites how you want, easier.Cheers,MC

Share this post


Link to post
Share on other sites

I myself am all for complying with Web standards. I've always thought that the Internet was the perfect medium for global interaction, and standards are a wonderful way to realize this goal.

 

That said, I don't believe that sticking to these standards will, at least at this point in time, make a difference in SE Ranking. I mean, sny Website that's not standard-compliant but renderable by a browser is invariably guaranteed to be indexed and treated the same by SEs as another one that is fully compliant. And that's a good thing, from the perspectives of Web surfers and SEs.

 

I mean, SEs are not into the business of enforcing standards. They're into the business of providing Web surfers with Websites that has the information they're searching for. They don't really care if those Websites comply to the standards or not.

 

Yes, I agree that a compliant Website might have a slight edge to one which isn't. But that edge is really, really slight, that it isn't enough incentive.

 

Of course, that doesn't mean standards are worthless. Quite the contrary. I think standards can actually make it easier for Webmasters to make their Websites more SE-friendly.

 

Anyway, to sum up, although I don't believe standards-compliance makes much of a difference to SE Ranking, I still firmly believe that it's a great thing to keep in mind nonetheless.

Share this post


Link to post
Share on other sites

Thanks everybody for your interests, suggestions and comments.

Let me directly come on to the topic. While testing some sites for W3C compliance, I found that almost none is cent percent valid. And it has also been reported by the members of different other forums that they had the same experience. So I think, one may not bother too much if there are few errors in their webpages. But I don't want to mean that you can ignore such errors.

Now here is a good suggestion for those using scripting/programming languages.

But if you're working with some scripting/programming language which outputs html, you better use/find an editor...

If someone in this forum is using such an editor for PHP scripts, will you mind telling the name/link of that editor.It'll be of great help for me.

Now comes few views regarding search engine ranking.

So far as search engine ranking goes, as it has already been pointed out, they really care least for valid HTML till date. But you never know what will happen in the near future even.

Finally, I have a question, and frankly speaking, it may appear to be meaningless to you all, but it has bothered me a lot.

I would like to spell out it in little more details.

While validating my site for correct HTML, I really could not find a suitable <!DOCTYPE> declaration. My site uses lots of PHP Scripts. So I used the following declaration :

<!DOCTYPE php PUBLIC "-//W3C//DTD php 4.01 Transitional//EN">

And I observed two things.

1. My CSS got distorted, that means, each <DIV> layer seems to be shifted by few pixels.

2. The brightness of the image appears to improve.

So far as the first observation goes, I corrected it by changing the positions of the <DIV> layers, but regarding the second observation, I am really confused.

Now on changing the <!DOCTYPE> declaration back to :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://forums.xisto.com/no_longer_exists/; - both the position of <DIV> layers and the brightness of images were restored.

Also I tried to validate few other websites having PHP Scripts ( few popular forums) and found that these are not W3C.

Now my question is that, whether there is any other <!DOCTYPE> declaration for pages containg PHP Scripts?

And is there any site that will validate my PHP pages?

Once again, I must say that my question as well as observations may appear funnny but I am helpless. <!DOCTYPE> declaration for PHP pages has really bothered me a lot.

 

Before leaving, just one more link for those who actually intend to validate their sites for W3C. W3.org provides the necessary guideline for selection of proper document type for your HTML pages.

Regards,

Sid

Share this post


Link to post
Share on other sites

It is recommended that your page validates, because you search engine
rankings might be affected if you have a lot of errors on your page or
only fancy features.

Google recommends for example site maps:

"Offer a site map to your users with links that point to the important
parts of your site. If the site map is larger than 100 or so links,
you may want to break the site map into separate pages."
https://support.google.com/webmasters/answer/35769

Google also recommends that you don't use fancy features everywhere on
your site:

"If fancy features such as Javascript, cookies, session ID's, frames,
DHTML, or Flash keep you from seeing all of your site in a text
browser, then search engine spiders may have trouble crawling your
site."
https://support.google.com/webmasters/answer/35769

In addition to fancy features you should also have a page with static
links so the Google bots can follow the links:

"Make a site with a clear hierarchy and text links. Every page should
be reachable from at least one static text link."
https://support.google.com/webmasters/answer/35769

There are other validation services besides W3C. Here are some
validation results for your page http://www.reinhartlaw.com/ :

"I was not able to extract a character encoding labeling from any of
the valid sources for such information. Without encoding information
it is impossible to validate the document."
http://validator.w3.org/

[can't validate]
http://forums.xisto.com/no_longer_exists/

"CSE HTML Validator Lite v3.50 generated 1 error message, 6 warning
messages, and 2 other messages when checking this web page. These
problems could damage this web page's search engine rankings as well
as cause viewing problems for visitors."
http://www.onlinewebcheck.com/

wojta

Share this post


Link to post
Share on other sites

There is no DOCTYPE for PHP, because PHP is a scripting language, it's not a web language for documents. You are most likely using PHP to output (X)HTML so you should use a DOCTYPE that works for that language and make sure your scripts output correctly.I use PHP extensively, I also know what type of documents I'm using it to output which is mostly XHTML 1.1, Everything I do web wise should be standard compliance, everything I want to do web wise will be standard compliance. I don't like IPB because of how many errors it produces, while it tries to conform to XHTML 1.0 Transitional (an easy DOCTYPE to pass in my opinion, yet it fails). IPB still uses deprecated elements for bold, italics and underline, and because it doesn't allow people to modify it, it will remain that way till their developers think seriously about it.If you're looking for a forum software that does it's best keeping to XHTML 1.0 Strict, then I would have to recommend PunBB which is quite clean, not so many features, and fast to load, which I'm currently looking at cleaning up it's code and implementing more features into it.As for a PHP editor, tsWebEditor is quite good and another called PHP Developer (I think). It doesn't matter what editor I use, but these ones may help you out.Cheers,MC

Share this post


Link to post
Share on other sites

Thanks for your reply. And I think, I have got my answer in your post. It is clear that there is no DOCTYPE declaration for PHP. Depending upon the output, I have to choose an appropriate DOCTYPE.
Anyway, I have a specific question regarding Google Adsense and HTML validation. Please look at the code for Adsense for Searches:

<!-- SiteSearch Google --><form method="get" action="https://www.google.com/custom&%2334; target="google_window"><table border="0" bgcolor="#ffffff"><tr><td nowrap="nowrap" valign="top" align="left" height="32"><br/><input type="hidden" name="domains" value="http://www.domain-name.com/rg-erdr.php?_rpo=t;......

"</input>" tags that it contains do not seem to comply with HTML standards. The "<br/>" tags are not XHTML compliant. What to do with those tags?

Regards,
Sid

Share this post


Link to post
Share on other sites

WOW validation! Well I guess my site works anyway if it does have wrong HTML!Anyway, it will be interesting to see and see if my Google rankings go up (currently 4th when my site is the most relevant!).Compuccino

Share this post


Link to post
Share on other sites

On the topic of w3c Standards as it relates to SEO, I have a comment or two which may be of some value.

 

One thing which writing 'Standard Compliant Code' does, is force the separation of Content and Style. For instance, the use of CSS files is Standard Compliant. Using them properly, the styling is removed from the html page and the Bots do not have to wade through it to determine the 'Content' on your page. They like that, apparently, so if for no other reason, validate your code for this reason alone.

 

And having the embedded and inline css removed from the page makes the file easier to debug and read yourself, so that is another reason to validate.

 

Along the same lines, validation removes the deprecated coding found in many 'older' web sites which are proprietary to the various Browsers and which do not neccesarily work in all Browsers, so that is another good reason to validate.

 

As to the problem you were facing with the slightly re-positioned div's, lacking a fully compliant and valid DTD, the Browser you use to view the page would only be guessing about certain things ( google on Quirks Mode )and including a proper DTD takes the guesswork out of the matter for the Browser. So, be sure to use a correct and complete DTD at all times.

As the Browsers used by most clients today are likely 'newer' Browsers, they will behave more consistently as they read a Compliant page of HTML, whereas, a page without a complete and correct DTD will be open to interpretation.

As to the right DTD to use: There is little reason to use Transitional or Loose Doctypes, ( and NO reason for Framesets ), I find it just as easy to target for Strict as anything else. And this results in fewer Hacks in my CSS. Of course, until IE decides to use the Standards, we'll have to continue Hacking out its deficiencies (vis-a-vis the Standards), but using a Strict Doctype seems to help here as well. (As a technique for switching doctypes for IE, I use use the MS proprietary Conditional statement.)

 

These are my comments on the Topic. I only hope it helps someone to understand the issue better.

Share this post


Link to post
Share on other sites

Sorry to continue the thread but this was not the answer I wanted. Let me spell out my doubts more specifically. So far as I have read and understood, Google does not allow publishers to modify the code in any form and Adsense code should be copied and pasted in your webpages direct.

Code Modification
Any AdSense ad code, search box code, or referral code must be pasted directly into Web pages without modification. AdSense participants are not allowed to alter any portion of the ad code or change the layout, behavior, targeting, or delivery of ads for any reason.


Please see Google Adsense Policy .

I must appreciate, I am a new comer in the Adsense, so I do not really know much about that. As I have seen many experienced as well as co-operative Web masters here, so, if anyone of you may like to suggest me as to whether I should correct the Adsense codes for XHTML compliance or leave it intact as it is at present, that will be of great help for me.
Regards,
Sid

Share this post


Link to post
Share on other sites

I must appreciate, I am a new comer in the Adsense, so I do not really know much about that. As I have seen many experienced as well as co-operative Web masters here, so, if anyone of you may like to suggest me as to whether I should correct the Adsense codes for XHTML compliance or leave it intact as it is at present, that will be of great help for me.

 


Well, Sid... Modifying the Google AdSense code is a MAJOR No-No! Many a Website has been eternally banned from the program for doing that.

 

But in reality, that's not such a bad thing... after all, the slight non-compliance of the AdSense code is highly unlikely to affect your overall Website performance or SE Ranking in anyway. Plus, Google provides many decent configurations for their AdSense code, so it's not really that much of a hassle :P.

 

 

Cheers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.