SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : Site Design and Critiques :

Previous DiscussionNext Discussion
 Does validation really matter?

Ok, I know that .NET creates a lot of "invalid" markup (according to the validators). My question is, if you're hand-coding something, does validation really matter all that much? Especially if you run it through the W3C validators and put the little

Valid XHTML 1.0 Transitional

Image on your website?

I mean, if you're setting up a site to do freelance, does that matter, or do people not care, as long as the site looks good, is functional, and suits their purpose?

What purpose does validation actually serve?

I'm trying to wean myself off of table-based layouts (for the most part). I have a great little design that I like that doesn't use tables. It validates, but from some of the things I've read here and elsewhere on the net, validation just isn't that important.

Started By Monte on Dec 30, 2009 at 12:03:26 PM
This message has been edited.

15 Response(s) | Reply

Earlier Replies | Replies 9 to 15 of 15 | Later Replies
Goto Page: 3 2 1
bod1467 on Jan 12, 2010 at 12:37:44 AM (# 9)

My site is really old and needs a revamp. This is basically a side-business for me versus my (paying) day job. :-)

SiteGuru.co.uk

When I build a site for a client I always check its validation anyway, and if it's easy to make it valid I do so. But if there is something specific in the client requirements that cannot be achieved with validated markup then I don't concern myself too much as long as the site works correctly in the target web browsers (as agreed with the client).


brian on Jan 12, 2010 at 1:53:54 AM (# 10)

I primarily write web-apps as opposed to web sites and creating valid code is important only from the sense of making it cross browser. The same goes for CSS validation.

If you stick with XHTML transitional and include the meta tag for the char set you should be fine. Run code via the validator to make sure it is well formed but don't worry if it isn't perfect. If you're using .NET and ensure everything has transitional, you should be able to achieve validation but it's not critical.

The best thing you can do is make sure you try it in IE, opera, firefox and Safari (if it is fine in safari, it is fine in chrome too) and you'll be sure to have covered all browsers.

To be honest, it is usually JavaScript that causes headaches rather than the HTML and CSS. There are a few simple rules there, mostly with events: always pass event in as a parameter.

e.g. onclick="IClicked(event)"
in the event do something like
functin IClicked(evt) {
evt?evt:event;
var tgt=document.all?evt.srcElement:evt.target;
}

This will give you the target that was clicked and the event object

For cancelling an event there is a few lines of code you need at the end:

if (document.all) {
evt.cancelBubble=true;
evt.returnValue=false;
} else {
if (evt.stopPropagation) evt.stopPropagation();
if (evt.preventDefault) evt.preventDefault();
}
return false;

sizes of the display for floating and resizing:

var hgt=document.body.parentNode.clientHeight;
if (!hgt)
hgt=document.body.clientHeight;

Sizes of objects, This can be a pain but most items have a clientWidth/Height and offsetWidth/Height. if you take offsetWidth-clientWidth you'll get border sizes and margins for the width, similar for height. So, if you want to size something to exactly 200 pixels in code, you'd do the following:

obj.style.width=(200-(obj.offsetWidth-obj.clientWidth))+"px";

This basically guarantees the object with its styling takes up no more than the 200 pixels wide

most other things fall into place.

If you're dynamically binding events it becomes more complicated.

These are just a few things I've figured out as I go along and thet work on most, if not all, browsers that I am aware of.


ChrisRickard on Jan 24, 2010 at 9:33:08 PM (# 11)

For cross browser JavaScript I've really been into jQuery lately. It really does a fantastic job of unifying all the different quirks of each browser into 1 powerful yet easy to use API.


Terry Young on Feb 2, 2010 at 5:19:32 AM (# 12)

"What purpose does validation actually serve?"

My first rule nowadays is to stay away from browser's Quirks Mode. For that reason, simple HTML errors like missing a slash or improperly closing elements (yes, I do still hand code) could cause layouts to go wonky.

I use validation as a "tool" to help me find these errors. But usually it's my last resort.

At one time I had similar issues it just made no sense to me. Validating it through and it all came clear.

I use it as a debugging tool. Nothing more, nothing less. Customers don't really care.


MHenke on Feb 3, 2010 at 1:56:29 AM (# 13)

100% agreement to that, Terry.
It's pretty exact what came into my mind as I first saw the topic of this thread. I just was too lazy... 8)

Validation is a tool for developers, the common customer don't care at all.

WRT those icons, maybe they're appropriate on tech-related sites, just to spread the word.


matt1968gto on Feb 12, 2010 at 11:22:59 PM (# 14)

  W3C yea ok so then what? W4C? Thats when we can all rest, no worries, here's my password...DINGDONG@%$


matt1968gto on Feb 12, 2010 at 11:24:37 PM (# 15)

  Hey Terry have you been smokin again....Newports right?


Earlier Replies | Replies 9 to 15 of 15 | Later Replies
Goto Page: 3 2 1

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.