PDA

View Full Version : Validating your Html


topsites
06-12-2006, 01:29 PM
Has several benefits:
- The site loads faster as browsers no longer compensate for any errors. A browser is a piece of software designed to read, interpret and display html code, the less errors the browser has to weed out, the faster it runs. An error-free site is like a weed-free lawn :)
- WWW search engines and robots really like 100% error-free code for reasons similar to the browser issue.
- It looks good when your site can show this:
http://www.htmlhelp.com/cgi-bin/validate.cgi?url=http%3A%2F%2Fstonypointlawncare.com%2F&warnings=yes&spider=yes

Drawback:
- It is a royal pita to debug code, much to the dismay of Wysiwyg program users who may find even Dreamweaver can create errors.
- Requires the use of a syntax-based color code editor such as Edit Plus 2 (http://www.editplus.com/), which unlike Notepad, provides actual line numbers and the code tags are colored depending on nature of tag (that's what syntax-based means, image tags can be red, link codes are green, etc...
(Makes it easy to read and spot specific parts).

The site validator:
WDG Html Validator (http://www.htmlhelp.com/tools/validator/)
(works recursively, can check up to 100 pages max., click 'Validate entire site').

Hope that helps some...

Brianslawn
06-15-2006, 03:06 AM
so much for no errors......




The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

--------------------------------------------------------------------------------

Please try the following:

If you typed the page address in the Address bar, make sure that it is spelled correctly.

Open the stonypointlawncare.com home page, and then look for links to the information you want.
Click the Back button to try another link.
Click Search to look for information on the Internet.



HTTP 404 - File not found
Internet Explorer

topsites
06-15-2006, 10:03 PM
I am sure sometimes a router gets filled up with requests and other times some server may glitch, but the site is online.

Brianslawn
06-15-2006, 11:11 PM
still get error contacting you on contact screen

topsites
06-16-2006, 01:09 AM
still get error contacting you on contact screen

ohhh I thought you meant the link to the validator was broken. :dizzy:

silly me, it works now.
(yes, i just tested it after fixing the error).
Thanks for pointing this out

notes: <form action="formmail.cgi"> requires a method="post" :cry:

fubu2
07-22-2006, 08:23 PM
You can also use http://validator.w3.org/

mdvaden
07-22-2006, 10:47 PM
My pages supposedly have a bunch of code issues, but many came with code from script code sites like http://dynamicdrive.com

Anyhow, the code issues have not hurt our google pagerank nor our SERPs

Even with some questionable code, our site matches or runs circles around the other arborist, landscape designer and landscape sites in Oregon. Primarily because we rank at the top in ALL three niches. There's only one landscape designer site in Oregon that is one position higher than ours, but they only capture that one nich, whereas we have all three niches.

It shows that content and reciprocal links are much more valuable than code.

That's not to say that clean code won't help.

fubu2
07-23-2006, 02:37 AM
mdaven, you had about 71 errors in the code on you main page.
They didn't really have anything to do with the scripts, they were more related to the way you had XHTML and HTML 4.0 tags mixed together.
The main things were: always specify the doctype; the <table> tags cannot have "height" in them, has to be in the td tag; tags that don't use a closing tag have to be self closed, for instance <img src="pic.jpg" />; all tags have to be lowercase for XHTML.
That attached file is you page with no errors (I was bored:) ), change the extension to .html since it wouldn't let me attach that way..

topsites
07-23-2006, 01:31 PM
It shows that content and reciprocal links are much more valuable than code.

That's not to say that clean code won't help.

I agree, proof is in the pudding when you look at some scamner's sites on the Internet trying everything under the sky to gain traffic, the code and load time can be impeccable while the traffic is still nil. Then you look at one decent site and the code can be horrendous with high load-times, and still the site gets a ton of clicks.

As far as PR achievements and other ranking measures are concerned, ultimately if the site gets no traffic, those measurements mean nothing. Since it has been proven pr can be spoofed, what good is it, it doesn't mean the site gets even the first visitor while a pr 4 site can get anywhere from 5 to 5,000 daily visitors, as an example. That is not to say your achievements mean nothing, but I feel the ratings mean more to you as a guide than bottom line truth, ultimately it is a bit like statistics.

But, if your site is decent and you get what traffic you get, clean code and optimized graphics will help boost your *existing* traffic anywhere from 10 to 100 percent (by 100 percent, I mean double). Conversely, if you get no traffic, this method is also worthless :laugh:

topsites
07-23-2006, 01:40 PM
My pages supposedly have a bunch of code issues, but many came with code from script code sites like http://dynamicdrive.com

Yeah, I found that out some time back, unfortunately a lot of those scripts (javascriptsource and others as well) are either not clean to begin with, or they are not compatible with your version of HTML... I've fixed more than a few over time, they still work but before you fix, either make a back up or know where to get the original.

It literally never ends, first the headache and finally you got your site up and all is fine and dandy... Then you find out you need to use a standardized html and you find out there are more than a few versions of html as a code, each with their own peculiarities. So, once you finally decide on a version, then you find you can't do some things with that and you see about other versions and they all have their flexibilities and limitations. :cry:

As for me, I found Xhtml 1.0 transitional to be the most flexible standard language... Of course, as the name implies, the strict version is more correct than the transitional, but the strict version offers less functionality (more limitations).

mdvaden
07-24-2006, 08:38 PM
mdaven, you had about 71 errors in the code on you main page.
They didn't really have anything to do with the scripts, they were more related to the way you had XHTML and HTML 4.0 tags mixed together.
The main things were: always specify the doctype; the <table> tags cannot have "height" in them, has to be in the td tag; tags that don't use a closing tag have to be self closed, for instance <img src="pic.jpg" />; all tags have to be lowercase for XHTML.
That attached file is you page with no errors (I was bored:) ), change the extension to .html since it wouldn't let me attach that way..

This could be a fun winter season project.

I think I finally found the size and look of the pages to keep. Now I can work on the code part.

mdvaden
07-25-2006, 07:35 PM
mdaven, you had about 71 errors in the code on you main page.
They didn't really have anything to do with the scripts, they were more related to the way you had XHTML and HTML 4.0 tags mixed together.
The main things were: always specify the doctype; the <table> tags cannot have "height" in them, has to be in the td tag; tags that don't use a closing tag have to be self closed, for instance <img src="pic.jpg" />; all tags have to be lowercase for XHTML.
That attached file is you page with no errors (I was bored:) ), change the extension to .html since it wouldn't let me attach that way..


For fun, I traded that index page text with my current index, renaming my index as limbo, and the one you provided as index.

Currently, we rank high on Oregon searches, like the top 1 to 3, with a Google Pagerank of 4.

I'll check the Google PageRank after Google does it's dance again and see if our PR raises a notch to 5.

By the way, Much of those apparent code errors are automatically accomplished things in Dreamweaver. It doesn't show them as errors.

For example, if I place a 300 pixel image in a table, Dreamweaver seems to assign 300 as the table or table cell size.

Is that the kind of thing you were mentioning?

fubu2
07-25-2006, 11:39 PM
For example, if I place a 300 pixel image in a table, Dreamweaver seems to assign 300 as the table or table cell size.

Is that the kind of thing you were mentioning?
Yes. The height attribute isn't listed anywhere in HTML specs as a valid attibute for the table tag, but it used to work sometimes. Now, in some browsers, and always if you specify a doctype (like the file I edited), it won't render correctly. You can specify the table height by making a class for it in your css code and it will validate, something like this: #table1 {height:300px} and in the table code: <table id="table1" ... >
None of that is really a big issue, unless you are concerned with your page looking the same in every browser every time.

mdvaden
07-26-2006, 05:41 PM
At least my home page displayed consistent and correctly with Firefox, Opera and IE.

When I swapped your code file and reloaded the home page, it shrunk about 1/16 of an inch off the height of the page.

Thanks, by the way.