Tag Info

Hot answers tagged

35

I think it's definitely worth doing, but you should never be a slave to validation -- it's a fool's game. http://www.codinghorror.com/blog/2009/03/html-validation-does-it-matter.html Validate your HTML. Know what it means to have valid HTML markup. Understand the tooling. More information is always better than less information. Why fly blind? Nobody cares ...


32

I consider valid HTML a worthwhile goal, but do not see it as the be-all and end-all of building good websites. The trick is, your markup may be perfectly valid, yet it may not be semantic - e.g. using tables for layout or navigation. There's a difference between valid code and semantic code. On another note, if you use advertising or external scripts, ...


22

You can download the source and/or packages direct from w3[1]. [1] http://validator.w3.org/source/


22

I think it's worth it, as I've caught many markup and logic errors by seeking validation. It's one of those "necessary but not sufficient" things. Valid markup, like code that compiles (or checks out via JSlint) free of errors, warnings, and hints, is a good first step in getting it right.


19

It is valid because test could be a top-level domain and localpart@top-level-domain is a valid email address. See for example Email address, domain part


17

I like to use Honeypots in my forms since the user won't notice them, they keep most crap away but are not 100% foolproof. The trick is to make a new form field in your existing form, for example <input type="text" name="email" id="mailfield"/> and put #mailfield { display: none; } in your CSS. If your form is submitted with data in the email field ...


10

To save time I use a Firefox Extension called HTML Validator. It adds validation to your view source window, tells you errors and warnings in a bottom pane. Also puts an icon in the bottom of your window showing you a quick reference for yes/no on validation. If no, then you just view source and it shows you exactly what your errors are. Also validates ...


10

Technically, "#" is a well-defined URL reference that points to the start of the current document, so it is not “broken” in formal sense. It can, however, be regarded as bad for accessibility, and it is also a common symptom of “fake” links, i.e. a elements that are supposed to link to something external but depend on JavaScript. (In the very old days, <a ...


8

Validation in of itself isn't so critical, since few browsers are 100% compliant and the spec isn't 100% clear on how to interpret the rules. However being valid HTML puts you in a better position to adapt and improve your site. As the standards move, they will typically migrate forward and if you new site is valid, then updating to support the latest ...


8

Use a combination of timestamp, spinner, field names, and honeypots... Read this article for the detailed example. A timestamp is exactly what it sounds like. A hidden field that marks the time when the form was originally opened. This defeats playback bots that copy a form and replay back the submission process over and over with different data each time. ...


8

Since CSS3 is not a completed spec and probably won't be for a while validating it is really a point in futility. If you want to use the new CSS features you're going to have to accept that your CSS isn't technically valid. Invalid CSS doesn't affect usability since users have no idea what CSS is much less if it's valid. As long as the results rendered in ...


6

In general, on the web with an international audience I think it can't be done, I'm not even sure you can do with a credit card number. As I see it, you have two choices (and because you didn't give any background information I have no idea if they are relevant for you): Limit your potential audience to a small group you have information on (example: if ...


6

Having valid HTML and/or CSS probably isn't a ranking factor. However, it is recommended that your code validate as it helps to ensure your content is properly crawled and indexed. Invalid HTML code can break a crawler just like it can break in a browser. As a result you should try your best to ensure your code is valid and easily read/crawled/interpreted by ...


5

Have you checked out HTML Tidy?


5

All methods should be left in place for Google verification. Removing them will unverify your site. It isn't brought up on the main verification info page, but tacked on to the end of all the detail pages for the methods(meta, HTML, DNS, GAnalytics), eg: Don't delete the tag from the page, as this will cause your site to become unverified. I don't ...


4

You can validate HTML and CSS locally (and do a lot of other useful things) with the Web Developer Toolbar add-on for Firefox. It's also available for Google Chrome.


4

You need to use an appropriate doctype. This has been covered (for HTML docs) on StackOverflow: http://stackoverflow.com/questions/2761622/new-facebook-like-button-html-validation


4

You can find your answer in the same link you passed (http://www.google.com/support/webmasters/bin/answer.py?answer=183668), in the section Sitemap Extensions.


4

Keep in mind that CSS3 as well as HTML5 are still under development, so what is said to valid today can be no more tomorrow and vice-versa. But this is no reason to not use it if your concerns are usability and SEO. @John Conde gave a clear idea about that. You just need to make sure relative old browsers (there are many developers and entities dropping ...


3

HTML Tidy, developed by Dave Raggett of W3C, can validate & automatically fix errors. It can work from the command-line


3

The W3 validator is open source (written in Python I believe) so you can download and run it locally. I can't for the life of me find the download link on w3.org though.


3

The best approach is to learn which invalid HTML is bad, and which invalid HTML does not matter. For example, forgetting to close a <div> tag is very bad, because your layout will almost certainly screw up in one or more browsers. However, using <br> instead of <br /> in XHTML does not matter - all browsers will interpret both as a line ...


3

One reason to test your site for valid HTML is that it ensures that the search engine spiders will be able to fully index and determine the meaning of your pages. If they cannot do so due to malformed HTML (which the major browsers may work around for historical reasons) then you are potentially limiting your search engine rankings. There has also been ...


3

When running the validator, you'll need to examine the errors it gives you on a case-by-case basis. Is validation important? To me, yes, it's very important. But is it a requirement? No. Things like using the same ID multiple times (instead of a class), putting block-level elements inside inline-level elements (usually these elements don't fit this way ...


3

I like low-tech: Doing a simple math problem works well. Enter what 4 + 4 adds up to: Then check server-side for 8. This is one I've used successfully on blogs using the Math Comment Spam Protection Plugin. Adding an extra field to your forms like: <input name="bots_only" value="" style="display: none" /> Usually, if bots_only is passed along ...


3

There is no way to do it for free. There are non-free ways of doing it but they aren't cheap, in the US they require birth date and SSN, and outside the US you get a hodge podge of solutions. If you decide you want to spend the money check out Lexis Nexis, they are one of the premier online identification services and they have solutions for a number of ...


3

I really think this would be a security issue if you can see it with JS or Flash. Actually, neither JS or Flash shouldn't offer access to any details of the user's PC except some very basic data about the OS, browser, screen resolution and such, things that you would actually need quite often. Who knows, might be possible with IE6 :D


3

That's perfectly fine. It's usable, accessible, and (not coincidentally) search engine friendly. (You might consider using the alt attribute of the image tag to describe the image for users with screen readers or for when the image fails to load. But that doesn't directly affect your question as the caption essentially serves as anchor text for that link).



Only top voted, non community-wiki answers of a minimum length are eligible