Why is it important to validate your code?
Why is it so important to make sure your code is validated? I know it is the correct way to do things, but what are the other benefits of doing it?
Why is it so important to make sure your code is validated? I know it is the correct way to do things, but what are the other benefits of doing it?
openmind posted this at 22:44 — 5th September 2004.
He has: 945 posts
Joined: Aug 2001
Well for one it will make you a good person and ensure that you go to webbie heaven!
Seriously though, murder is wrong as is robbery as there are laws that say so. Same goes for standards so we shoud all make the effort to follow them. Not to mention that you code will be faster, cleaner, easier to undertsand, cross browser compatible, friendly to those with disabilities, future proof, etc, etc, etc
KarenArt posted this at 22:44 — 5th September 2004.
She has: 354 posts
Joined: May 2001
... cause chicks dig valid code!
In reality, there are a few browsers that will let you get away with sloppy coding and will still display the page (although it may look different than you intended depending on how sloppy the code is). The more the browser obeys web standards (I love Safari for the Mac), the more likely it is that your page will look wrong or won't display at all.
As we're getting into newer and newer browsers, the chances of unclean code working is getting less and less. And too... if you're looking for a consistant look cross-browser, it becomes more important to know and use valid coding.
Another thing to be aware of (and avoid) for cross-browser compatibility... browser specific coding (usually something you see IE doing).
LOL... I love this!
gotta finish redesigning my sites so I can show them again.
The purpose of education is... to get more jokes!
openmind posted this at 22:45 — 5th September 2004.
He has: 945 posts
Joined: Aug 2001
You'll have to check out my css scripting!
Abhishek Reddy posted this at 06:20 — 6th September 2004.
He has: 3,348 posts
Joined: Jul 2001
In my experience, no.
Matt, it just makes sense to write valid code. Fundamentally, it's more about creating semantic markup, allowing the document can be "self-aware" -- that is, to give meaning to its content in any outside context. Or that's the ideal, at least. It's a step towards XML.
Current standards attempt to rid code of a lot of information noise such as browser and display hacks, and moving styling info to CSS. On a practical level, this gives you faster, cleaner, accessible, easier to maintain, efficient code.
Busy posted this at 11:21 — 6th September 2004.
He has: 6,151 posts
Joined: May 2001
Dang, there goes my new pick up line
Dragon of Ice posted this at 14:24 — 6th September 2004.
He has: 578 posts
Joined: Jun 2004
Beat me to my own joke, Busy.
kb posted this at 18:19 — 6th September 2004.
He has: 1,380 posts
Joined: Feb 2002
For your own personal bragging rights to your friends...
Suzanne posted this at 19:35 — 6th September 2004.
She has: 5,507 posts
Joined: Feb 2000
Industry standards. Know what you're doing. Quit being a hack, be a forward thinking productive member of the industry.
Roo posted this at 20:25 — 6th September 2004.
She has: 840 posts
Joined: Apr 1999
As someone who has just recently given up WYSIWYG and started hand coding to standards, I have to say it feels good to know that I am doing the best I can do for my clients. I've been spending a lot of time at the W3C school, and am now working on streamlining my css skills.
Things I'm noticing:
While before everything worked fine in 6 different browsers, I find there is less twakage needed. Pages are loading faster.
The downside:
When you have a client who uses Front Page and Word to add content to their own sites, and you've created valid xhtml and css.....watch out............you are going to have a mess to clean up.
Roo
Roo posted this at 20:33 — 6th September 2004.
She has: 840 posts
Joined: Apr 1999
Oooooooooops I wasn't done!
Less tweakage means that I cut the time spent down, and I'm able to hand off a site sooner, cutting the cost for the client, and freeing me up for other things.
I'm also currenlty looking at all of the things you can do to make a site accessable, and it's easier to pass accessabilty tests when you start out with standard code.
I do have another downside though......some javascripts, and php scripts will cause a page not to validate. It's frustrating, and unless you are really adept with programmimg languages it can be VERY frustrating.
Roo
Abhishek Reddy posted this at 23:38 — 6th September 2004.
He has: 3,348 posts
Joined: Jul 2001
Absolutely, I have trouble with this too. It's why my personal site doesn't validate. Very frustrating.
KarenArt posted this at 23:48 — 6th September 2004.
She has: 354 posts
Joined: May 2001
Hmmm... well javascript, php, and assorted validating problems just gives you more reasons to take the codes apart and figure out what it doing right?
I understand that frustration! I cringe everytime I have a new javascript or cgi code I need to put on a site. Everything always seems to need fixing.
gotta finish redesigning my sites so I can show them again.
The purpose of education is... to get more jokes!
teammatt3 posted this at 03:21 — 7th September 2004.
He has: 2,102 posts
Joined: Sep 2003
Thanks for the input, I guess I better shape-up and start coding to standards
openmind posted this at 07:47 — 7th September 2004.
He has: 945 posts
Joined: Aug 2001
Good man! Welcome to the professionials!
Busy posted this at 11:25 — 7th September 2004.
He has: 6,151 posts
Joined: May 2001
Most PHP and Javascript will validate, just a case of & instead of & and lower case names/values etc
KarenArt posted this at 12:57 — 7th September 2004.
She has: 354 posts
Joined: May 2001
Couldn't agree more JeevesBond!
I still haven't made anything as impressive as the layouts at csszengarden, but knowing how everything fits together... and being able to change layouts on a whim is soooooo much fun!
Hmmmm... maybe it's xhtml that chicks dig...
gotta finish redesigning my sites so I can show them again.
The purpose of education is... to get more jokes!
steve40 posted this at 21:24 — 1st February 2006.
He has: 490 posts
Joined: May 2005
It gives you an excuse for those Bald spots. You can always blame them on pulling your hair out, while trying to validate your code.
JeevesBond posted this at 12:41 — 7th September 2004.
He has: 3,956 posts
Joined: Jun 2002
As touched-on earlier, validating code isn't the only part of our reasoning. It's making the move to XML (for those who use XHTML anyway) and the act of seperating code from content, it's amazing what can be achieved with this - has anyone checked out http://www.csszengarden.com -- that's what made me switch...
It's not just a change in the way you code, it's a whole different way of thinking that encompasses the initial design right through to implementation, personally using XHTML and CSS has given Web Design a whole new meaning for me. I now find it exciting again, and using standards based code can create designs which make sloppily-coded sites look awful. Sorry - that may sound like I'm "blowing my own trumpet" honestly it's not, standards based design is the key to any successful site I've made.
Modularisation rules baby!
a Padded Cell our articles site!
Roo posted this at 02:15 — 8th September 2004.
She has: 840 posts
Joined: Apr 1999
Now there's something I didn't know! Good info!
Roo
WesB86 posted this at 16:28 — 27th January 2006.
They have: 39 posts
Joined: Jan 2006
Speaking of validating...how do you get gradient's to validate?
I designed wescosales.com with html and css and had my entire site validated...not an easy thing to do but so proud when i was able to show the W3Cschool validated icon. Then changed my header with a gradient and also added "trafficzap" banner and now it won't validate...any help would be extremely helpful.
WesB86
robbluther posted this at 16:36 — 27th January 2006.
He has: 73 posts
Joined: Jan 2006
How do you get ColdFusion Code to validate?
openmind posted this at 09:52 — 3rd February 2006.
He has: 945 posts
Joined: Aug 2001
You don't have to worry about CF as it's server side. You just need to make sure that the code it does output is valid. For example www.searchwebby is bot XHTML strict and driven by complex CF....
Megan posted this at 16:44 — 27th January 2006.
She has: 11,421 posts
Joined: Jun 1999
Carrie - the first thing you need to do is put that background into your CSS rather than using the table attribute. So you'd have style="background: url('images/blueheader.jpg');" or a class for that table in your mystyles.css that would include that bit. Same with the valign="top" further down that's throwing a error.
It's also throwing errors on some of your ID's - ID's should only be used for unique items. That is, things that only appear once on the page. If they're used more than once, you should use a class instead of an ID.
For the trafficzap thing, you just need to encode the ampersand in the url. SO instead of &, put &. (that's actually in Busy's post at the very top of this page!!)
Fix those things and it should validate
Rob - I don't know about CF. It's not a standard so the validator wouldn't understand it. It does handle PHP pages fine. You'd have to try it and see what happens.
Megan
Connect with us on Facebook!
WesB86 posted this at 16:53 — 27th January 2006.
They have: 39 posts
Joined: Jan 2006
thanks so much i'll get right on it..i just love having the validation code on my pages and if i do it with css it will change all at once...that will be extremely nice...i'll get back with you and thanks again
WesB86
WesB86 posted this at 02:26 — 28th January 2006.
They have: 39 posts
Joined: Jan 2006
Megan,
Thanks my site is 99% validated. By tomorrow it will be 100%...this forum is beyond awesome and so helpful.
Carrie (WesB86)
wescosales.com
Dux0r posted this at 16:56 — 31st January 2006.
She has: 31 posts
Joined: Jan 2006
A few reasons (off the top of my head) why valid code is good:
1. Your code will take up less space. Especially if you use CSS instead of style elements.
2. Your web pages will be future friendly (and easier to maintain).
3. Your web pages will be more cross-browser friendly, hence more people will be able to view your site as you intend.
4. Your web pages will be compatible with older browsers.
5. Your web pages will be more Search Engine friendly (yes, search engines DO care about valid code, most SE's see your web page just like Lynx browser which doesn't allow for any invalid HTML at all).
6. Your web pages will be able to be read by screen-readers and other disability-aimed programs and applications, hence more people will be able to view your web pages.
There are plenty more reasons, but I'm sure you can see that valid code IS important as well as moral.
Hope this answers your question =)
WesB86 posted this at 00:34 — 2nd February 2006.
They have: 39 posts
Joined: Jan 2006
WEll...many thanks for all the help..my site is now 100% validated (putting the validate icon on all the pages in the next day or so) and I'll be working on the boring, conservative logo now...this forum is awesome.
Carrie (WesB86)
wescosales.com
WesB86
dragonsjaw posted this at 03:03 — 3rd February 2006.
She has: 120 posts
Joined: Oct 2000
Nothing like ressurecting a post from 2004!!! I started reading from the beginning and lo and behold.. ran into posts from 'old timers' I haven't 'heard' from in awhile.
Funny that validation is still being questioned.
"Nothing worth having comes without some kind of fight- 'Got to kick at the darkness 'til it bleeds daylight." - Bruce Cockburn
dk01 posted this at 19:19 — 7th February 2006.
He has: 516 posts
Joined: Mar 2002
For those people who don't want to think of it in terms of code. Think of it in terms of cars. 30 years ago cars were simple and therefore easy to fix. If something went wrong my dad could fix our car without the help of a mechanic or even a manual sometimes. Nowadays cars are so complex that only trained professionals can deal with all the electrical circuits and special features. Is this a bad thing? No, it just means the consumer demanded to have more advanced features, and for that to happen the design of cars had to become more complex. Sure my Dad can't fix the car but now he has power windows, AC, and many other features.
If you take this example of the car and translate it to the progression of coding web standards we can see great features like AJAX (controversial, I know) and XML being formed on the premise that the document they are working with is valid.
Imagine trying to roll down your power window and having it turn on the AC instead! One simple crossed wire can do that! That's why we need to demand perfection in our industry and web standards/validation are the way to do that.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.