iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-04-2006, 11:22 AM
garettharper's Avatar
WebProWorld Member
 
Join Date: Sep 2006
Location: Lexington, KY
Posts: 27
garettharper RepRank 0
Default HTML validators

Hey guys,

Many of the websites submitted for review could use a tool such as a HTML validator and I was wondering, what options are out there and which is best? Lets stick to free ones for now, as many of these budding webmasters aren't looking to spend money at this point...
__________________
Garett Harper
iEntry, Inc.
Reply With Quote
  #2 (permalink)  
Old 10-04-2006, 11:31 AM
greeneagle's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Houston
Posts: 5,285
greeneagle RepRank 0
Default

http://validator.w3.org/ for HTML
http://jigsaw.w3.org/css-validator/ for CSS

Ken
__________________
Mountain Eagle Marketing
Contemporary Art News
Modern Art News
Reply With Quote
  #3 (permalink)  
Old 10-04-2006, 12:09 PM
Lerza's Avatar
WebProWorld Member
 
Join Date: Mar 2006
Location: Lexington, KY
Posts: 78
Lerza RepRank 0
Default

Both validators that Ken provided are from the W3C (World Wide Web Consortium) and reflect accepted web standards.

Results from these validators are to be taken quite seriously.
Reply With Quote
  #4 (permalink)  
Old 10-07-2006, 01:30 PM
WebProWorld Pro
 
Join Date: Apr 2005
Posts: 259
johngroup RepRank 1
Default

If you use Firefox, there's a W3C validator extension as well.
Reply With Quote
  #5 (permalink)  
Old 10-08-2006, 12:10 AM
bj's Avatar
bj bj is offline
WebProWorld 1,000+ Club
 
Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,172
bj RepRank 3bj RepRank 3
Default

I know I'm sticking my foot in it but believe it or not, the w3 css validator is not the best. There are one or two things it shows as errors on the css validator that according to their own specs are not. One that I hit a lot is this:

.clearA {
overflow: hidden;
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;
}

This is a standard bit of code that is usually used in a br tag to clear floats. If put through the w3 css validator in a stylesheet, it will cause this error:

Line: 191 Context : .clearA

Invalid number : line-height Parse Error - [empty string]

The rule for line-height reads like this:

"The computed value of the property is this number multiplied by the element's font size. Negative values are illegal. However, the number, not the computed value, is inherited."

Null is not a negative value. It is a null value. A null value is also not an empty string.

Yes, if you're just starting out it can pick up a lot of the common errors, but don't expect it to be the be all and end all. And if something doesn't make sense, look it up in the spec.

I also highly recommend htmltidy for cleaning up your html code. It can also be used to "translate" an html 4.0 doc into xhtml, which I've used more than once to clean up someone else's nasty code with all the TAGS in CAPITAL LETTERS. :)
Reply With Quote
  #6 (permalink)  
Old 10-08-2006, 07:02 AM
dharrison's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: May 2005
Location: Essex, UK
Posts: 1,289
dharrison RepRank 4dharrison RepRank 4dharrison RepRank 4
Default

Quote:
Originally Posted by bj
I know I'm sticking my foot in it but believe it or not, the w3 css validator is not the best. There are one or two things it shows as errors on the css validator that according to their own specs are not. One that I hit a lot is this:

.clearA {
overflow: hidden;
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;
}

This is a standard bit of code that is usually used in a br tag to clear floats. If put through the w3 css validator in a stylesheet, it will cause this error:

Line: 191 Context : .clearA

Invalid number : line-height Parse Error - [empty string]

The rule for line-height reads like this:

"The computed value of the property is this number multiplied by the element's font size. Negative values are illegal. However, the number, not the computed value, is inherited."

Null is not a negative value. It is a null value. A null value is also not an empty string.

Yes, if you're just starting out it can pick up a lot of the common errors, but don't expect it to be the be all and end all. And if something doesn't make sense, look it up in the spec.

I also highly recommend htmltidy for cleaning up your html code. It can also be used to "translate" an html 4.0 doc into xhtml, which I've used more than once to clean up someone else's nasty code with all the TAGS in CAPITAL LETTERS. :)
Although I do use W3C CSS I do agree that it is not the best.

I can get my stylesheet validated with no problem on W3C. It just throws up a long list of warnings which basically says to me "Oh, your CSS is fine, but ...." What good is that?

And it picks up really anal things as well. Like "No Background color on Heading X".

I am intrigued to try htmltidy based on what you say bj. That should come in handy for when I next have to clean up a site for a client (God I love this community!). ;)

I use FireFox a lot and I am only just getting to grips with its many functions. Is their HTML/CSS validator just as good as W3C?
__________________
Deb Harrison
DVH Design
Essex Web Design
Reply With Quote
  #7 (permalink)  
Old 10-08-2006, 12:02 PM
bj's Avatar
bj bj is offline
WebProWorld 1,000+ Club
 
Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,172
bj RepRank 3bj RepRank 3
Default

Unfortunately htmltidy doesn't have css validation. I wish it did.

The best two tools for css are both extensions for Firefox.

The Aardvark FF extension-- this is my MOST USED TOOL. Bar none. Why? It's simple to use and it actually shows what div is "pushing" on what, so when I edit my stylesheet I know instantly where the problem lies. Using it has actually made me a better coder, since I now know which mistakes to avoid.

The other tool is Chris Pederick's Web Developer Toolbar, but unfortunately the validation just brings you to the same w3 css validator.

The BEST way to validate CSS is to first run both the xhtml/css in the w3 validators, and then post the page to the CSS-Discuss Mailgroup. If you have any mistakes in your markup, they'll gleefully point them out. :)
Reply With Quote
  #8 (permalink)  
Old 10-08-2006, 12:08 PM
bj's Avatar
bj bj is offline
WebProWorld 1,000+ Club
 
Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,172
bj RepRank 3bj RepRank 3
Default

One more thing.

Quote:
I can get my stylesheet validated with no problem on W3C. It just throws up a long list of warnings which basically says to me "Oh, your CSS is fine, but ...." What good is that?

And it picks up really anal things as well. Like "No Background color on Heading X".
Though I find those warnings just as annoying as you do, they are there for a reason. Just go into your browser settings and switch your "default" background color to fuscia . . . and the one time you make the mistake of NOT setting the white background that's always been your browser default, it will be a REAL eye opener!
Reply With Quote
  #9 (permalink)  
Old 10-08-2006, 06:57 PM
greeneagle's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Houston
Posts: 5,285
greeneagle RepRank 0
Default

I am starting to think that the newer-found interest in making sure to declare background colors, even if "transparant" may reflect how the SE's could be looking for CSS SPAM.

I could be "off" there, but it makes sense and it's really no special effort for the extra mile. I haven't had time to check that aspect more thoroughly.

Ken
__________________
Mountain Eagle Marketing
Contemporary Art News
Modern Art News
Reply With Quote
  #10 (permalink)  
Old 10-08-2006, 07:40 PM
bj's Avatar
bj bj is offline
WebProWorld 1,000+ Club
 
Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,172
bj RepRank 3bj RepRank 3
Default

Hmm, I guess that's possible.

There was a discussion awhile ago on Matt Cutts' blog about that, but it was also brought to his attention by more than one person that a lot of things we do for accessibility can be construed as "deceptive" even though the intent is not. One thing is though that usually when an image replacement technique is used it's simply for a short headline, and in only one place on the page, which we'd all hope can and will be filtered out of the algorithm.
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:38 PM.



Search Engine Optimization by vBSEO 3.3.0