homepage Welcome to WebmasterWorld Guest from 54.242.231.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

This 93 message thread spans 4 pages: 93 ( [1] 2 3 4 > >     
Are you AFRAID of Validation?
pageoneresults




msg:3832108
 10:07 am on Jan 22, 2009 (gmt 0)

Okay, what is it that deters you from validating your documents? Is it the fear of running that first validation routine and finding hundreds of errors? Ya, I'll agree, those validation reports can be rather daunting to the uninitiated.

I was just performing a quality check on recently changed pages and WHAM! 47 errors on a page. Yikes, where did that come from. To the untrained eye this would have been enough to make me hit the back button and just avoid the whole process altogether. The site works and looks just fine, I have no idea what those 47 errors were, are, will be. ;)

I check the first error in sequence and I left out a closing </p> element. Run validation again and tada, all is fine. Yes, one closing </p> element missing and it caused a cascade of 46 other errors. When I first started validating (a long, long time ago), I remember looking at those errors and gasping. Then I realized that if you take them one by one as they are presented, you'll find that many of the following errors are a cascade of the ones up top. Did that make sense?

I know we've had topics in the past on the most common validation errors and I think it is always good to refresh memories and alert new Webmasters that there is nothing to FEAR when validating documents. It may appear to be somewhat major at first but once you start addressing the errors in sequence, you may be able to go from 300+ to under 50 with just a few corrections in your HTML. The example I provided above with the closing </p> element is a primary error that many run into. Just one or two missing and/or incorrectly nested elements and validation is a mess.

Remember, take the errors one at a time and start at the very top of the validation report. Don't jump down to the middle of the report as that won't do you any good. You have to address the errors in sequence so that you don't end up "chasing the cascade".

W3C Markup Validation Service
[validator.w3.org...]

W3C CSS Validation Service
[jigsaw.w3.org...]

W3C RDF Validation Service
[w3.org...]

How many errors do you have on your home page this very moment? Let's get them corrected. No code dumps please. Just the first error in sequence and we can work from there. If you have hundreds, well, you'll probably need to follow along and work most of those out yourself. There will be many here who will most likely have upwards of 200, 300 and even 500+ errors. If you have errors in this number range, this is something that should be looked at soon as there are surely some in there that are potentially fatal in nature. I can understand a handful of common errors. But not a high number of uncommon errors, those could be trouble.

 

phranque




msg:3832149
 11:30 am on Jan 22, 2009 (gmt 0)

i love those green check marks!

and while it isn't a validator per se, the semantic data extractor in a sense validates your structural markup.

Semantic data extractor - QA @ W3C:
[w3.org...]

and another type of validator for me is the lynx text-based browser, which gives you an extremely practical test of your img tag alt attribute valuation, semantic structure, content linearization, etc.

lavazza




msg:3832314
 4:01 pm on Jan 22, 2009 (gmt 0)

i love those green check marks!
Don't we all :)

However, I have discovered that not all that's green is gold... results that include warnings still get a green (favicon) tab logo thingy

If/when validating a whole bunch of pages, its all too easy to miss the warnings :(

poppyrich




msg:3832462
 7:22 pm on Jan 22, 2009 (gmt 0)

Does the CENTER tag give an error when you validate?
If so, then to hell with validation.
It's not a mistake, it's a choice.

In a recent survey, less than 5% of sites were in any way standards compliant.

To borrow a phrase from the study of law - there are two standards at work here. One is the "common standard" which is the way web pages are actually written by real people in the real world.
The other one is the "legislated standard" of the W3C.

How many Google pages validate? I would guess nearly none.

When you buy a book, has the typesetting been "validated"?
Of course not, it's absurd. It either looks good, or it doesn't.
You judge the book by it's contents, the words within it, which is what you paid your money for in the first place.

At any site I see those little W3C badges proclaiming that the page is valid, I'm really turned off by it.

Juvenile, if you ask me.

pageoneresults




msg:3832481
 7:46 pm on Jan 22, 2009 (gmt 0)

Woohoo! Get ready to rumble...

Does the CENTER tag give an error when you validate?

Ya, it will. That element has been deprecated for quite some time.

15.1.2 Alignment
[w3.org...]

The CENTER element is exactly equivalent to specifying the DIV element with the align attribute set to "center". The CENTER element is deprecated.

If so, then to hell with validation. It's not a mistake, it's a choice.

Heh! It's that type of thinking that has gotten us to where we are today.

In a recent survey, less than 5% of sites were in any way standards compliant.

Survey? Did they scan the entire Internet and then crunch the numbers from there? Or was this a select group, not unlike yourself, who participated in the survey? ;)

To borrow a phrase from the study of law - there are two standards at work here. One is the "common standard" which is the way web pages are actually written by real people in the real world. The other one is the "legislated standard" of the W3C.

It is actually the other way around. Browsers are developed around the standards. And then the developers have to take into consideration all the things that are non-standard. It is a real pain in the arse, I know, I've spent the last few years building a tool that emulates the browser and bot. Freakin' HTML errors are a time suck in providing accommodations. :)

How many Google pages validate? I would guess nearly none.

Not a valid argument. It pains me to see the largest Internet brand not take this validation thing seriously. That doesn't mean you or I don't have too.

When you buy a book, has the typesetting been "validated"?

Of course it has. Do you know the process involved before that book goes to press? Man, that thing has been "validated" by numerous people. And if it hasn't, you're going to end up with poor grammar, typos, etc.

And last but not least, let me address this comment sir...

At any site I see those little W3C badges proclaiming that the page is valid, I'm really turned off by it. Juvenile, if you ask me.

That would happen to be every site under my control. Juvenile? Oh boy! I'm going to chalk that comment up to jealousy. I hear it all the time. It usually comes from those who can't get their pages to validate no matter what they do. Don't worry though, I'm here to help. :)

pageoneresults




msg:3832484
 7:50 pm on Jan 22, 2009 (gmt 0)

If/when validating a whole bunch of pages, its all too easy to miss the warnings.

I always like to drop a link to this validator when discussing bulk validation. Many do not know of its existence. I use it all the time. Almost every day.

WDG HTML Validator
[htmlhelp.com...]

You can either invoke the Validate Entire Site from above or go directly to a Batch Processing page. I prefer to use the above and go from there. That Liam Quinn does an excellent job of keeping that validator afloat. You can batch process up to 100 URIs at once. But, if they are rife with errors, it is going to stop at its predefined error count maximum. If you've reached that during a batch validation of pages, something is wrong and you should take a look at those errors to see what is going on.

rocknbil




msg:3832497
 8:13 pm on Jan 22, 2009 (gmt 0)

When you buy a book, has the typesetting been "validated"?.... And if it hasn't, you're going to end up with poor grammar, typos, etc.

Not to mention the hours that go into making every chapter start on the same page (right or left, depending on style,) making facing pages bottom out, adjusting those pages so there are no widows and tombstones, and making your adjustments + or - standard line length progressively, so that you don't have two lines long showing through the next page which is two lines short . . . . yeah it gets validated to standards over 300 years old . . . and the rise in eBooks has allowed amateurs to break all these rules, upsetting standards publishers have been working with all these years. -1 point again for the Internet . . .

Center as an attribute or a standalone tag is content mixed with markup, that's why it's deprecated, and why it's unnecessary.

Do valid html icons make you jealous, is this what annoys you about them? :-) I find "valid html" icons annoying only when the page doesn't validate . . . which is most of the pages I see with them.

Are you AFRAID of Validation?

Absolutely not, I LOVE validation, if for no other reason, for this one: it is the gateway to the solution of the bane of every developer, the doorway to freedom from the one thing that drives us nuts, cross browser compatibility. Validate your pages, you're 90% there. It's more of a tool than an acid test.

Trace




msg:3832515
 8:39 pm on Jan 22, 2009 (gmt 0)

I'm all for best practices and having good habits, but I gave up on the whole validation thing a long time ago.

If I'm starting off with a blank page, I can assure you that once I'm done, that this page, at that exact moment will validate with no errors, is semantically correct and accessible. That is as far as I'll go. Once the page gets put to use, in the real world, it's near impossible, and definitely not cost effective, to maintain a "valid" status.

Different CMS's that are using different WYSIWYG editors that spew out different mark up, the actual editors that are doing the data entry, content from different locations and data sources... whatever the reason, it's just not realistic to think that it will all come in the same standard format.

In a perfect world we would have one Doctype, one standard to follow. Maybe then we could set different goals, like achieving valid pages, but for now I'll be content in knowing that the pages I deliver look and behave the way they're supposed to. (I don't remember ever having this conversation about a compiled language)

Afraid of validation, hardly. I'm barely aware of it's existence.

wsda




msg:3832678
 12:09 am on Jan 23, 2009 (gmt 0)

edit: NEVERMIND it appears to be a Firefox cache bug with the Web Developer toolbar. After I shut down and cleared my cache then reloaded the page these weird errors went away. I'll leave the original post here so Google can cache it forever thus making me immortal...
======================

Hope this isn't in the wrong thread. I'm not understanding why validation is failing on my page. I have two nested DIV tags and an UL with LI../LI elements, then everything is closed in the proper order. I thought DIV and UL are block-level elements, thus fine to nest...? They are all inside of a TD element in a table, perhaps that is the issue? Code:

<table class="tableB" border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td valign="top" align="left"><div id="ctl00_LeftMenuInsert"><div id="leftMenu"> <ul>
<li><a href="/">WSDA Home</a></li>

etc...and here is the validator message I get:

Error Line 99, Column 84: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
00_LeftMenuInsert"><div id="leftMenu"> <ul>
The mentioned element is not allowed to appear in the context in which you've placed it;

Any hints please?

encyclo




msg:3832730
 1:35 am on Jan 23, 2009 (gmt 0)

Welcome to WebmasterWorld wsda, consider yourself immortalized ;)

As to the original question, I'm certainly not afraid of validation, but I'm not afraid to fail validation either - as long as I know and understand why the page fails.

BillyS




msg:3832760
 2:43 am on Jan 23, 2009 (gmt 0)

>>How many errors do you have on your home page this very moment?

Zero, once you create clean code, it's not very hard to keep it clean.

lavazza




msg:3832838
 6:10 am on Jan 23, 2009 (gmt 0)

>> >> How many errors do you have on your home page this very moment?

>> Zero, once you create clean code, it's not very hard to keep it clean.

I have zero errors on ALL of the PAGES on ALL of the DOMAINS that I designed AND/OR maintain... and most of 'em display as desired in IE, too ;)

lavazza




msg:3832846
 6:22 am on Jan 23, 2009 (gmt 0)

Once the page gets put to use, in the real world, it's near impossible, and definitely not cost effective, to maintain a "valid" status.
If you don't even try, how do you know?

FYI: you're wrong

Different CMS's that are using different WYSIWYG editors that spew out different mark up

I claim: 'There is NO SUCH THING as a WYSIWYG

Prove me wrong

bill




msg:3832856
 6:50 am on Jan 23, 2009 (gmt 0)

I claim: 'There is NO SUCH THING as a WYSIWYG

Prove me wrong

Sure there are. You just have to be a little flexible in your expectations. ;) Basic presentational WYSIWYG in most modern CMS systems certainly can generate a true WYSIWYG experience. Their WYSIWYG experience of formating text, making lists and making hyperlinks would qualify.

lavazza




msg:3832866
 7:07 am on Jan 23, 2009 (gmt 0)

Please name one

tedster




msg:3832873
 7:26 am on Jan 23, 2009 (gmt 0)

...in the real world, it's near impossible, and definitely not cost effective

This depends on the complexity of the infrastructure and the size of the web development team. In a major enterprise, publishing a lot of new content from many authors every day or even every hour, I often see the challenge to cost effectiveness for 100% validation. Still, most of the time, good pre-planning of the templates can get around that - IF the site starts our with a solid CMS.

Validation is not as important to me as the avoidance of critical errors. The mark-up should be well-formed, even if some warnings might still be triggered. Things that can be attained by the entrepreneur may not be so easily done for the behemoth. That's the entrepreneur's advantage.

Some websites are like huge ocean-going tankers. They cannot change directions very quickly, it takes a major expenditure of energy.

swa66




msg:3832885
 8:25 am on Jan 23, 2009 (gmt 0)

Every page I touch with an editor gets validated afterward, and fixed till it validates.

I mostly use the w3.org validators as they are easy to use from the web developer toolbar add-on for firefox.

The WDG HTML Validator above link is interesting. I tried it on a few smaller sites and they went through with flying colors. I tried it also on one of my old sites and well, I fixed quite a few errors. Now if they didn't have that 100 page limit (think that site has many thousands), I'd get them all.
Where did these errors come from on that site (a site I do care a lot about, it's my first):

  • old age: Over the years content got updated to look ok, but I didn't always use that it will validate attitude (and since it's setup with heavy use of SSI, the content itself isn't often edited at all.)
    I didn't fix certain pages that are intended to be replaced real soon now (that's 15 year old content right there, and html version 1 was ... a bit different)
  • generated content: some generated content was way out of wack, not sure where it came from but it stood out that generated stuff deteriorates faster than static content for some reason
  • somewhat dynamic content that got unexpected input over time (e.g. something pulling links in that had "&" to separate parameters instead of "&amp;", easy code fix, but the problem wasn't there when first implemented.)

Anyway I wish e.g. the web developer toolbar would pop a big fat warning that my CSS/HTML was invalid on a list of sites I set up for it. That way I would see those invalid code warnings a lot easier.

I think it's easy enough to keep code valid if you edit the (x)html and css in a text editor. It's just a minor nuisance to do so, and you get rewarded dozens times over by not having browsers guess what you meant.

For CMS systems it's dependent on how good they are. If you didn't have compliant code as a requirement when choosing the CMS, getting it now will be kinda too hard.

Trace




msg:3833081
 1:54 pm on Jan 23, 2009 (gmt 0)

Please name one

Publishing sites created with MOSS 2007 provide a very complete CMS with a very nice WYSIWYG interface.

In regards to this topic, a bare bones, straight out-of-the-box install, of a SharePoint site, before adding any content or modifying any of the templates generates;
308 Errors, 95 warning(s)

Even if I wanted to try and eliminate some of the validation errors, 90% of the components are compiled.

poppyrich




msg:3833168
 3:22 pm on Jan 23, 2009 (gmt 0)

I kind of suspected my post would create a mini-conflagration and I wanted to leave time for any interested parties to sound off.
We can go tit for tat forever, parsing the meaning of the word "valid", arguing over whether theory should precede practice, and on and on.
Hey, we are not talking about unimportant things (IMHO) and it should get some heat, some passion.

(And, oddly, BTW, I write standards-based pages, myself.)

But anyway, my response is simple - baloney is what I say.

WHAT you say is more important than HOW you say it. And anything that obscures or diverts from that is not only juvenile but dangerous.

Are these little merit badges really all that important to you, scout?

[edited by: tedster at 3:53 pm (utc) on Jan. 23, 2009]

tedster




msg:3833186
 3:37 pm on Jan 23, 2009 (gmt 0)

WHAT you say is more important than HOW you say it.

And that's clearly the approach that major search engines take today. If we avoid errors it just makes their job easier.

swa66




msg:3833344
 6:51 pm on Jan 23, 2009 (gmt 0)

a bare bones, straight out-of-the-box install, of a SharePoint site, before adding any content or modifying any of the templates generates;
308 Errors

Well it's not surprising me, MSFT's disregard for standards in products like their currently in use versions of IE made me expect as much.

As with all parsers of syntax (including your browser!) there is often a cascade of errors following from a single error.

E.g. suppose you forget to close a <p>, the parser encounters a <ul>. It can now take guesses as to what you meant: either the <ul> should not be there, or either the previous <p> should have been closed. Which it chooses means a lot of errors down the road if it picks the other one than the actually meant thing.
(current browsers tend to pick the other interpretation and silently close off a <p> to prevent the cascade of errors, parsers I've seen all complain about everything that follows, so sometimes a single human errors can generate a lot of errors from parsers.
Those that write e.g. C, perl, ... code know this too, it's a common thing with parsers.

The trick to those who care to have standards compliant code and choosing your CMS in a future-proof manner could (should?) be to have it genereate that compliant code in the first place.
Not easy, but why not add it as a requirement when choosing a CMS ?
I understand people not caring enough, it being too difficult to switch, but I doubt out here people would not be caring at all.
So when choosing a new CMS why not do it right ?

victor




msg:3833367
 7:11 pm on Jan 23, 2009 (gmt 0)

A page will always validate unless a webmaster has taken an active step to inserting errors.

For those of you who make conscious efforts to deliberately insert errors: Why? What advantages (short- and long-term) are you seeing?

lavazza




msg:3833368
 7:12 pm on Jan 23, 2009 (gmt 0)

Publishing sites created with MOSS 2007 provide a very complete CMS with a very nice WYSIWYG interface.

Really?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">

<link href="/_Services/Ont/en-us/Ont.css?b=5595.1000" rel="stylesheet"/>

<link href="/global/images/css.aspx?AssetID=HX101515261033&b=5595.1000" rel="stylesheet"/>

<script src="/_Services/Ont/oo.js?b=5595.1000" type="text/JavaScript" language="JavaScript"></script>

<link href="/global/images/css.aspx?assetid=HX101412871033&b=5595.1000" rel="stylesheet"/>

<link href="/global/images/css.aspx?assetid=HX101412881033&b=5595.1000" rel="stylesheet"/>

<SCRIPT LANGUAGE="javascript">

var strShow = 'Show';
var strHide = 'Hide';
var strRtl = '';
</SCRIPT>

<STYLE TYPE="text/CSS">
.ACICollapsed
{
display: none;
}

.ACECollapsed
{
display: none;
}
</STYLE>

<NOSCRIPT>
<STYLE TYPE="text/CSS">
.ACICollapsed
{
display: inline;
}

.ACECollapsed
{
display: block;
}
</STYLE>
</NOSCRIPT>

<SCRIPT>
function go(url)
{
window.open(url, "_self");
}

function OpenInNewWindow(url)
{
go(url);
}
</SCRIPT>

<STYLE TYPE="text/CSS"> .cdONBodyCellPadded { padding:0px; } </STYLE>

<html >
<HEAD>
<TITLE>SharePoint Server Home Page - Microsoft Office Online</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<meta name="MS.LOCALE" content="en-GB">

</HEAD>



Source: hxxp://office.microsoft.com/en-gb/sharepointserver/default.aspx

Errors found while checking this document as HTML 4.0 Transitional! [validator.w3.org]

Validation Output: 7 Errors

1. Error Line 6, Column 6: end tag for "HEAD" which is not finished.

</head>

Why am I reluctant to believe you?

pageoneresults




msg:3833393
 7:35 pm on Jan 23, 2009 (gmt 0)

Are these little merit badges really all that important to you, scout?

I'm going to call you the Puppet Meister as you are surely pulling me strings. ;)

You know why I use the badges? Because they provide one click "referer" access to validate the HTML and CSS of that page. And for those who understand their meaning, they are surely in the same realm as an Eagle Scout Merit Badge. As mentioned earlier, less than 5% of websites validate. I'm proud to be in that percentile and I don't mind sportin' me little W3 badges in the process. It has also become part of my signature and has been for years. I be drinkin' the W3 Kool-Aid and lots of it!

Content Management Systems

What a nightmare that whole market has caused for validation, an absolute nightmare! I don't think I've come across one off the shelf package that I would put my stamp of approval on. I'm not the guy you want in QC who has the final say so either. ;)

I don't have any clients who need a CMS like those being discussed. The more control you give to the user, the less control you have over final output. It would be nice if there were a CMS that crunched everything through a validation routine before publishing, that way the users couldn't bork the system with their cut and paste routines from who knows where.

The major problem with many off the shelf CMS packages is that there is "too much" under the hood. Everything seems overly complicated for even the simplest tasks. The WYSIWYG interfaces that are presented to the user are usually left in their default formats. Now the user has this plethora of styling available to them that they really shouldn't have. There is no reason for them to have two or three rows of styling buttons up there when they are only going to be using 5-10 of them at most. The rest are going to break things!

I really don't understand where the FEAR comes from. I look at the code that is being generated and failing and think to myself, now there is someone who really doesn't care. Nah, they wouldn't qualify for this $150k per year position that I might have open. ;)

And to top it off, everyone is getting hacked these days with all this off the shelf stuff. Who really wants to deal with that?

willybfriendly




msg:3833401
 7:54 pm on Jan 23, 2009 (gmt 0)

WDG HTML Validator
[htmlhelp.com...]

Thanks for that p1r.

While my flood protection shut it down after about 20 pages, it did provide a quick peak.

RE off the shelf CMS... The site I checked uses one. The time put into the template pays off on the validation. The partial check I just ran kicked up a couple of ampersands in content, and a dup id attribute in my menu system. Otherwise everything came back clear.

I knew about the id duplication, but that is a compromise I chose to make at design time (it only kicks in at 3rd level and above menu items). I figured I could live with an id="active" in order to get the visual effect I was after, even if it did get duplicated on deeper items.

g1smd




msg:3833406
 8:03 pm on Jan 23, 2009 (gmt 0)

After validating a few thousand sites, I find that 99% of all errors are the same basic couple of dozen problems repeated ad infinitum. There's very rarely something new or different to fix.

I have found a Wiki that validates 100% out of the box. That's nice after the mess caused by many of the CMS products that are currently around.

koan




msg:3833414
 8:08 pm on Jan 23, 2009 (gmt 0)

My pages validate, but when I start adding widgets, search boxes, ads, feed links with & where I don't have control, etc, it's another story and I've learned to accept those. The foundations are always solid, and I would not accept errors from *my* code.

To the very defensive poster here who clings to his center tag, I have to say he reminds me of a grumpy friend who kept saying there was nothing wrong with MS DOS and he didn't see the need to upgrade to Windows. Well, eventually he had no choice and, although he wouldn't admit it now, he probably thinks he was being silly.

Sure, if you don't feel like updating an old site, let it be, but if you still use that tag on new sites, that's being silly, considering the immense advantages of a CSS site.

pageoneresults




msg:3833416
 8:11 pm on Jan 23, 2009 (gmt 0)

I find that 99% of all errors are the same basic couple of dozen problems repeated ad infinitum.

Ain't that the truth!

I've found on that first validation trip that a find and replace for the many common errors will usually bring a page "very close" to validating. Anytime I see that damn "Missing ALT Attribute" I cringe. And the unescaped ampersands is the bane of every Webmaster.

Then you have the missing quotes on attributes. Improper nesting of elements. Mish mash of HTML and XHTML which has grown exponentially over the past few years. Multiple IDs. Wrong DTDs based on page content, etc.

Give me a page with hundreds of errors, I'll have it spiffied up in no time. What you do with it afterwards is out of my control. ;)

Trace




msg:3833433
 8:45 pm on Jan 23, 2009 (gmt 0)

Validation Output: 7 Errors

1. Error Line 6, Column 6: end tag for "HEAD" which is not finished.

</head>

Why am I reluctant to believe you?

That's kind of my point. The user interface is rich, feature filled and clients are thrilled at all the creative freedom they now posses. You're some how suggesting that validation errors make that a bad tool for the end user?

Like mentioned above, select a CMS that is suited for your needs. I'm simply suggesting, that in my case, validation doesn't make the list.

User experience/satisfaction > Green check mark

pageoneresults




msg:3833443
 9:04 pm on Jan 23, 2009 (gmt 0)

Out of all the errors that I've seen, those missing and/or unfinished </head> elements are in my top ten for hair raising concern.

This 93 message thread spans 4 pages: 93 ( [1] 2 3 4 > >
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved