Loading ...
Sorry, an error occurred while loading the content.

1757RE: [NH] Tidy & CSE HTML Validator Lite

Expand Messages
  • Greg Chapman
    Feb 1, 2001
    • 0 Attachment
      Hi Lloyd,

      > I downloaded Tidy and ran it.

      That was your first mistake! :-)

      Read the HTML Tidy web page and about half way down you'll find the section:

      How to run tidy
      tidy [[options] filename]*

      HTML tidy is not (yet) a Windows program. If you run tidy without any arguments,
      it will just sit there waiting to read markup on the stdin stream. Tidy's input
      and output default to stdin and stdout respectively. Errors are written to
      stderr but can be redirected to a file with the -f filename option.

      If all that is gobbledy gook to you, then take heart. It's easy, with NoteTab
      when you know how.

      The NoteTab Help file says:

      The easiest setup is to copy the Tidy.exe program file to the NoteTab folder,
      but you may place it anywhere else if you prefer.

      What that fails to say is that if you decide to place your copy of TIDY.EXE
      somewhere other than your NoteTab folder then you need to adjust the NoteTab
      .ini file which should include a line similar to:

      TidyExe=C:\Program Files\NoteTab Pro\tidy.exe

      to point to your selected folder instead.

      Once you have TIDY in place, make sure the file you want to tidy is the active
      file in NoteTab and hit CTRL+F7 or choose "Tidy HTML code" from the TOOLS menu.
      You can also double click on the "Tidy HTML code" item in the HTML clipbook, or
      click on the appropriate clipbar button (if you have added the line:

      "HTML","Tidy HTML code","TidyHtmlCode.bmp"

      to your HTML.clb file to make the button appear). The clipbook/button runs a
      wizard which allows a number of options about how to tidy your file. With
      experience, you could, of course, edit this to run further TIDY.EXE options or
      even create a TIDY.CFG file in the folder where TIDY.EXE is, and exert still
      more control on how TIDY operates.

      Having started TIDY....

      If your file doesn't include a <!DOCTYPE> line then HTML TIDY will add one it
      thinks appropriate, given the style of your coding, and validate the file
      against that.

      For example, if you use lots of attributes to your <BODY> tag and don't have a
      link to a .CSS file then it will normally pick HTML3.2. Typically, I use a
      stylesheet and upper case tags and it normally selects HTML4.01 Transitional,
      unless I have been very picky in the tags I use when it will decide I've been
      trying to use HTML4.01 Strict. Once, for a test, by using lower case tags I
      even got it to recognise I was using XHTML!

      After it's run you'll probably find it will launch a new file within NoteTab
      which contains its output. This will be full of "Warning" lines and other
      suggestions and information about what TIDY has done. When you use TIDY like
      this, all the changes warned about will have been corrected in your original
      file. Note that the line numbers it uses to tell you where these changes have
      been made assume you do NOT have word wrap turned on, so you may need to turn it
      off to track down exactly what its done.

      All in all it's a wonderful program and does a great job. The only thing it
      doesn't do, as it's produced by those involved in setting W3C standards, is
      anything to tell you whether it's new improved code will actually show as you
      intend it to in a browser you haven't checked personally.

      > I then tried CSE HTML Validator Lite v2.01.

      Haven't tried this one because TIDY "worked for me!"

      > That brings me to my next problem. I have been thinking of trying to
      > upgrade what I have been building to one of the XML's. I don't know which
      > one I should try. Perhaps XHTML??? I am looking for a free tutor to show me
      > what how to build with it.

      It's XHTML you want and you could just let TIDY do it for you. Place a !DOCTYPE
      line at the start of your file which specifies XHTML, use NoteTab's facility
      modify things to XHTML standards and try it. TIDY will soon give you the clues
      about what's not acceptable!

    • Show all 7 messages in this topic