Hi! (First post, hurray!) I'd like some tips on how to validate and error-check my pages. http://validator.w3.org/ seems good, but often my pages are included asp/php and I have problems navigating to the appropriate line. I'm using Webuilder 2014. I don't have Dreamweaver. So, any tips to get a fast workflow for this? Thanks
Firstly why are you caring what validates? It has no meaning any more and people that set it as a requirement clearly don't know anything about web development. Browsers and Search Engines are smart enough to be able to read your code without worrying about a tag not being closed etc. If the code renders properly on all browsers then the code is good, it's as simple as that.
Thanks! Ok, so no validation needed? That's ok with me On the other side, doing a lot of manual editing typically leaves some errors here and there. Like <t r> for <tr> some closing-tags without start-tag and so on. Maybe it doesn't ruin the page, but it feels handy taking a check now and then. If page is long it can be hard to spot manually.
HuggyStudio's page takes a minute to load on IE8, doesn't work on IE6, uses 720K of code, 66 requests, has multiple Flash parts, has a fixed-width (bad-for-mobile) template, and the list goes on... That, G-Sun, is why validation is important.
How does validation have anything to do with that? Where's the flash? Only tested IE10, don't care for the others as it's my website. I just looked at your site, so what your saying is don't have a design as that creates load?
Little if anything in realistic terms, however it seems that the two go hand in hand far, far too often. Usually the people who say things like "writing valid HTML doesn't matter" are the same people who say things like "Oh everyone has broadband now" or "WCAG, what's that?" -- ignorant halfwit statements put forth by people who probably have no business building websites in the first place; given the inaccessible bloated train wrecks usually sleazed out any old way with that type of thinking. As to the OP's question, it REALLY hinges on how well the code in question is written or laid out. You've said a few things that kneejerk me into "throw it out and start over" mode like ASP, WebBuilder, etc, etc... most of which used 'normally' crap out such invalid inaccessible rubbish there is little if anything worth salvaging from them. I'd have to actually see the sites in question and their code to say more.
Are you joking? Valid HTML does matter. Accessibility - screen readers and similar could have problems. Crawlability - you could render your site uncrawlable. And as for browsers, they are not all "equal" or "smart". One might show it fine, but another could show it totally screwed up. @OP, switch to NetBeans and this will help you identify errors much more easily.
Use the W3 validator and compare it with the source code of your page. If you're using PHP include to have multiple documents in your code, then you'll need to open the page in a browser, and then Right Click>View Source, as this is the code that's been put together.
Which is why having well formatted output is JUST as important as well formatted source, possibly more so. It's why I'd add to the list of halfwit statements "Who cares what the output looks like so long as my PHP is neat"... Well guess what?
Hey first post here as well. @G-Sun if your question is still open, and following on what @jamjar919 said, why don't you check out http://html.validator.pro ? It wraps up calling the W3 validator, and shows you the validation errors _in the source_ , so "right click, view source" isn't necessary. I hope this helps, sorry my answer is late. Regards, Scott
@Scott, that is kinda neat -- interesting they call them "void elements" though -- since the W3C term is "empty" Though void would be a lot less confusing given that <div></div> is NOT a 'empty element' according to the specification, which is why there's no such thing as <div /> in XHTML. "empty" meaning it cannot contain content, not that it does not.
Sorry, this may have been a bad example. And I may be wrong, but the validator is saying, in this case, that the self-closing syntax is not valid for HTML4, although it is fine in XHTML and fine in HTML5. You can remove the slash on the closing bracket to fix it, or (even better) change the doctype to HTML5 which is really what I've always suspected this validator wants. And don't fret over void vs. empty! You'll do fine either way!