Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
Magical moments of mediocrity.

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.

user:
pass:
register,


                 

Builtin Validator

one less thing to do
  (+2, -1)
(+2, -1)
  [vote for,
against]

With all the concern about web standards, it'd be nice if web developers had a more convenient way to validate their code.

It may be possible to code a (X)HTML and CSS validator in Javascript that one could just include in their page.

The validator would either add the "valid css" and "valid html" logos or if the code is not valid, spit out the errors at the bottom of the page. That way, browser testing and code validation can be done at the same time.

Spacecoyote, Jun 21 2008

Big Red Angry Text (aka BRAT) http://accessites.o...big-red-angry-text/
Halfway there... [Spacecoyote, Jun 21 2008]

[link]






       What about just using a Firefox plugin ?
erlehmann, Jun 21 2008
  

       That solution is practical, but it isn't nearly as cross-browser compatible, future-proof, or cool as this one.   

       Also, this would allow a company to make sure that their coders do a good job. Their server could tack the script on, so they can't get away with trying to hide bad code from the boss.
Spacecoyote, Jun 21 2008
  

       1) What's this validator built in to?
2) Visual Studio does this for ASP.Net.
phoenix, Jun 21 2008
  

       Built into the page it validates--it is Javascript.   

       as in (V8 is the working title):   

       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html>
<head>
<link rel="script" type="text/javascript" href="/scripts/v8.js"/>
</head>
...
</html>
Spacecoyote, Jun 21 2008
  

       So every time the page loads, my browser has to validate it? No thanks.
phoenix, Jun 21 2008
  

       It would be commented out on the production server.   

       Alternatively, for "valid html" logo buffs, the validator could be activated by clicking the logo, and thus prove the validity.
Spacecoyote, Jun 21 2008
  

       // Alternatively, for "valid html" logo buffs, the validator could be activated by clicking the logo, and thus prove the validity. // Baked a thousand times.
erlehmann, Jun 23 2008
  
      
[annotate]
  


 

back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle