SitePoint Sponsor

User Tag List

Page 5 of 6 FirstFirst 123456 LastLast
Results 101 to 125 of 145
  1. #101
    SitePoint Evangelist Ed Seedhouse's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, B.C. Canada
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    One solution to this for people who want to make sure that the pages they view are valid would be to install a plugin or script of some sort into their browser that strips all the invalid garbage out of the web page.
    I think an add on for Firefox that does that, and then sends a nasty email to some central repository would be neat! I'd stick it on my copy of FF in a moment.

    The central repository could use the info to create a "hall of shame" site. I hearby release that idea to the public domain. :-)
    Ed Seedhouse

  2. #102
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,819
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by The Schaef View Post
    Or at the least, maybe some of these WYSIWYG editors could generate valid code.
    Quite a few WYSIWYG editors can output 100% valid code (for example Dreamweaver and KompoZer both can). The problem is that you need to configure the programs correctly and then use them the right way in order for the code to come out valid. If you don't configure them correctly and consider how you are adding the elements into the page then they can generate garbage code. It is all a matter of how you use them and a reasonably thorough understanding of HTML is required in order to get a WYSIWYG web editor to produce good HTML.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #103
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    Quite a few WYSIWYG editors can output 100% valid code (for example Dreamweaver and KompoZer both can). The problem is that you need to configure the programs correctly and then use them the right way in order for the code to come out valid.
    Yes, and there are easy 'gotchas'.

    For example, there is no one single way to specify a document's character encoding. One method of doing so specifies the encoding in HTTP headers. However, such headers do not exist in the HTML file, and if the file doesn't currently contain any characters outside of ASCII, then an editor like Dreamweaver could open it in one of many different character encoding modes - commonly Windows-1252 or ISO-8859-1 but perhaps UTF-8. All it takes is for a user to insert one non-ascii character while the editor is in the incorrect mode, and suddenly they have a document that is invalid, even though Dreamweaver believes it is fine. Dreamweaver does not know the context of the HTTP server it will be used in, and so doesn't know the correct encoding.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  4. #104
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    I suspect one of the secrets is to ensure easy validation.
    When working with Firefox I had firebug or course, but the web developer toolbar made validation a piece of cake. Many times throughout the day I'd be hitting <Ctrl>+<Shift>+A to validate the page code. It was fast, it was easy, and because of that I was able to find and fix potential issues in a matter of moments.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #105
    SitePoint Zealot evilunix's Avatar
    Join Date
    Jun 2008
    Location
    York, UK.
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I always make sure my websites validate, just out of habbit.

    I've pondered the same thing before though. Is all the effort worth it?

    When people ask me what's the point in validating, I tell them so the site will work across all browsers, but we all know that's not the case and a perfectly valid site will still usually be screwed up in IE6. Maybe I just wont bother from now on :d

  6. #106
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    It's because when the page doesn't validate, there is a much higher chance of things going wrong. Validating helps to ensure that there are no syntactical issues with the website, similar to grammar checking your essay. After you've checked the grammar of your page, then it's easier to deal with the few browsers that don't understand "up with this I shall not put".
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #107
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I've pondered the same thing before though. Is all the effort worth it?
    Several people have said "validate if you have the time". What? If you don't have the time to build a web page, write the copy, check the copy, create the design... all the other crap you have to do to "make a web page" you need time for. The hell, validation doesn't take me any time or effort. All the stuff everyone is saying is important (what it says, how it looks) takes time.
    I suppose I could say that I'll check my copy when I have time, or add a design when I have time... at that point, if I don't have time to do the important things for a web page, then I guess I don't have time to make a web page.


    I have a colleague who never seems to bother tying his shoes correctly. There is a 100% chance that he will step on a loose lace and fall down. But the question is, instead of doing a crap knot (he gets around pretty well for having crap knots, or no knots at all, most of the time), why doesn't he just buy some nice velcro shoes? Like they make for old people who can't tie shoes due to arthritis? I won't go around telling him to tie his shoes correctly-- that's his business, they're his shoes. But I don't understand why he continues to buy shoes with laces, or why some people bother building websites.

  8. #108
    SitePoint Zealot evilunix's Avatar
    Join Date
    Jun 2008
    Location
    York, UK.
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Several people have said "validate if you have the time". What? If you don't have the time to build a web page, write the copy, check the copy, create the design... all the other crap you have to do to "make a web page" you need time for. The hell, validation doesn't take me any time or effort. All the stuff everyone is saying is important (what it says, how it looks) takes time.
    I suppose I could say that I'll check my copy when I have time, or add a design when I have time... at that point, if I don't have time to do the important things for a web page, then I guess I don't have time to make a web page.


    I have a colleague who never seems to bother tying his shoes correctly. There is a 100&#37; chance that he will step on a loose lace and fall down. But the question is, instead of doing a crap knot (he gets around pretty well for having crap knots, or no knots at all, most of the time), why doesn't he just buy some nice velcro shoes? Like they make for old people who can't tie shoes due to arthritis? I won't go around telling him to tie his shoes correctly-- that's his business, they're his shoes. But I don't understand why he continues to buy shoes with laces, or why some people bother building websites.
    As I said, I DO validate all my websites. I think the point that is being made is, is not validating a website really considered a cowboy job, if it works in all browsers on all OS's etc?

    I noticed you edited your post, and rightly so.. It was a little bit harsh, considering.

  9. #109
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    I think the essay analogy works quite well. Would you hand in a 2000 word essay without putting it through a spell check and looking over grammar issues? Even if nothing looks wrong to you at first glance, is it worth the potential trouble in not performing those tasks.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  10. #110
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Tucson, Arizona, USA
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm one of those XHTML/CSS validation lovin' gals, but there's also this thing called Reality. It's where our clients live and work.

    Although many of them appreciate our efforts to make their sites valid, and they're willing to pay us to do so, let's face it, most of them are more concerned with how their site looks and how it helps them achieve their goals.

  11. #111
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I noticed you edited your post, and rightly so.. It was a little bit harsh, considering.
    Evilunix:
    Yeah, my inner Nazi was coming out. I also know validation is essentially spell-checking. It doesn't tell you if your content's good, if your design's good, if your application on top runs well. And then there are things where the developer says, "I need to use the <embed> tag because it works more smoothly in all browsers *today* and I'll deal with tomorrow when it comes."

    Sorry, I was using your quote as an example of the general sentiment, and actually I should've quoted the other guy as he's the one who specifically said he leaves validation for when there's time. I did not want to imply that you don't validate-- you were only asking if it was worth it.

    I think it is worth it in that it's on the list of Things You Should Do If You're Going To Bother To Do It. I think doing a web page the Right Way includes validation (by validation I mean testing for validation). If something doesn't validate but you have some great and wonderful reason to leave it in there, then you've still done your job. You've checked. My spell checker (back when I had one, way back in school) would not accept lists of hyphen-ending words, which are actually perfectly legal but you couldn't tell that to this spell checker.
    (Mono- and duo- and triple-rated whatchamajiggies would flag those first two words, for example.)
    But not checking is as bad to me as not bothering to write good copy in the first place, or using some sh*tty design because "it works" instead of "because it's the best for this site" etc...
    We can get by doing lots of things half-assed in life-- and life does go on. But if something matters to you, then you do more-- you do it Right.

    Again, apologies to you evilunix (unix? evil? oh noes!).

    most of them are more concerned with how their site looks and how it helps them achieve their goals.
    And in fact that's the whole reason their site exists anyway, they can rightly argue.

  12. #112
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,819
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    I think the answer to "why validate" should be that it makes the page easier to maintain.

    When the web page has display problems on one or more browsers it can be easier to locate and fix the error if the page was valid before you started to make the change than if it already had 500 errors. At least if the page is valid you know that the problem isn't caused by a missing tag.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  13. #113
    SitePoint Guru glenngould's Avatar
    Join Date
    Nov 2005
    Posts
    661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the question is why not validate? As I said before, you should not finish your work and start validating. Instead try to learn how to write valid code, and use valid code while marking up your document.
    Tweep List adds an avatar menu to Twitter (open source)
    Word Stats shows your most used words on Twitter

  14. #114
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If a word document doesn't quite meet the specifications for a word document, anything that tries to read it will throw a fit, and not interpret it correctly.

    Just because browsers are lax with what they accept as HTML doesn't mean you should use that as an excuse for laziness. Another user agent might not be so lax with it.

  15. #115
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    USA
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by Iconic_creator View Post
    What does it mean when your website does not validate?
    It means the site is not uniform with the WW3 specifications.

    So if your website does not pass validation does that mean something is wrong with it?
    Not necessarily, but more than likely it will not be displayed correctly unless
    you have the older DTD ( document type declarations ) set to the older versions, as browsers use that to determine how to "parse" your page/site.
    If you do not include the DTD, major browsers will go into "quirks" mode.


    Please advised. When do you ignore validation?
    Never really, since it is an attempt to get everyone uniform online
    so that browsers, especially the mobile ones will know how to
    display your info.

  16. #116
    SitePoint Enthusiast
    Join Date
    Jan 2008
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Great post!

    My programmer does not at think that validation is important. Told that it was not important.

    But this thread gives a good insight in what to think in this matter.

    If I wanted to validate my website, would it be enough to have my programmer correct all the errors found when running http://validator.w3.org/?

  17. #117
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    libbert: yeah, running code through that validator and correcting it until the validator says OK and goes green will make your page valid.

    However the validator is rather stupid. You can "fix" code in smart ways or stupid ways, and the validator can't tell you if you have GOOD code. It's possible that in order to validate (make valid) a really really crappily-coded page, that the fixes make the page not render correctly or cause other issues that then get hacked around. Not a good thing.

    Like, people might have this code:
    ...
    <body>
    <img id="logo" src="blah/logo.jpg" alt="logo">
    <div id="header">
    ...blah...

    And the validator will say that the image needs to be after (lists a bunch of block elements). So someone will not realise what that means, and do this:
    <body>
    <p>
    <img id="logo" src="blah/logo.jpg" alt="logo">
    <div id="header"> blah blah...

    Or anyway, I've seen similar things, and then the page ends up "validating" with really nasty ugly code. So, validate the right way and learn what it's talking about when it complains about something in the code.

  18. #118
    SitePoint Zealot nepalsites's Avatar
    Join Date
    Mar 2008
    Location
    Nepal
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i am not a big fan of W3C validation really. I wouldn't want a page that is just full of stupid contents or no contents or just under construction sign & is W3c Valid for XHTML & CSS.

    However if it shows few mistakes in coding let's say like of Yahoo homepage, but displays fine across the browsers then I wouldn't mind - its visitors won't mind - nor would search engines mind (in most cases). So no problem.

    W3C validation takes in consideration of accessibility as well, which may be considered just using excess code for many commercial sites.

    If you are a good coder, you will less likely to make unwanted mistakes in coding anyway. And as a website coder it feels good if you have that HTML/XHTML/CSS validations

  19. #119
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nepalsites View Post
    i am not a big fan of W3C validation really.
    So you are a fan of error riddled web pages that won't work with javascript because it can't figure out the DOM due to bad coding?

  20. #120
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    Well it's certainly easier to develop when you don't have to care about silly things like validation (tongue planted firmly in cheek)
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  21. #121
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,819
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It is certainly easier to track down rendering errors when you don't need to worry about whether they are caused by invalid code.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  22. #122
    I hate Spammers mobyme's Avatar
    Join Date
    Apr 2004
    Location
    Sunny Snowdonia
    Posts
    662
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    It is certainly easier to track down rendering errors when you don't need to worry about whether they are caused by invalid code.
    There you go again, that is just too much common sense. Seriously, why not validate your code. It's a precaution and does away with guesswork, like washing your cooking utensils or servicing the car, with luck you shouldn't poison yourself or breakdown miles from anywhere.
    There are three kinds of men:
    The ones that learn by reading.
    The few who learn by observation.
    The rest of us have to pee on the electric fence.

  23. #123
    SitePoint Wizard mcsolas's Avatar
    Join Date
    Jul 2004
    Location
    Hermosa Costa Rica
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    True, but that's just because of laziness. If you have user generated content, you'll need to provide a validator/clean-up utility for that content to ensure that the output is always valid. For (real) XHTML, of course, this is absolutely essential.
    I'm looking at this situation right now. I let people copy and paste stuff in using tinymce and no cleanup. Ive found code now that helps bring in only valid markup, as well I am installing a filter that cleans up the tags at the server side. Once thats in place, I can write a loop that cleans up the existing records and move on. Now I know better

  24. #124
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    libbert: yeah, running code through that validator and correcting it until the validator says OK and goes green will make your page valid.
    As has been pointed out before though, there are certain bits of invalid code that the W3C validator will not check for.

    For example, when using event attributes on elements (onclick="", onmousemove="" etc), you are supposed to specify the default scripting language in the document head somewhere (not sure how, I don't use inline events). The same applies for inline styles (style="") I think. I'm pretty sure the W3C validator will not pick up on this.

  25. #125
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    you are supposed to specify the default scripting language in the document head somewhere (not sure how, I don't use inline events).
    <meta http-equiv="Content-Script-Type" content="text/javascript">

    Yeah it seems that we were supposed to be setting the charset and MIMEtype meta tag first always as well : )

    Yeah, I know the validator misses things, felgall pointed out some as well. Sending XHTML to it (with that MIMEtype even) but using character entities such as &copy ; also don't get flagged (I would think they should).


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •