Every now and then, while websurfing, you will encounter a page with invalid HTML coding that will cause the following message: BAD HTML - Use Trace To Diagnose'. The good news is that this CAN be fixed. The bad news is that the webmaster of the site giving you problems is the one who has to be persuaded to fix it. In most cases where it is present, invalid HTML may just cause things to be displayed a little differently than the author of the page intended. With forms, however, tags in the wrong place can break the form. Some other browsers, including the two most popular, Netscape and Internet Explorer, are sloppy in their handling of invalid HTML and can work with forms that have invalidly-nested tags are present in a form even though that is in violation of the HTML specifications. It encourages a lot of sloppy HTML authors or sloppy programmers of HTML-authoring tools. The lynx browser, however, is very critical of invalid HTML. The most frequent cause of the "Bad HTML" messages is a set of improperly-nested tags. Correct nesting: (non-working example) Some text in bold.
Some more text in bold. Your E-mail Address:
Your Comments:
Incorrect nesting: Some text in bold.
Some more text in bold. Your E-mail Address:
Your Comments:
Notice how the first example has the bold text turned off with before the start of the form and then turns it back on with within the form? The second example has bold text that incorrectly overlaps the form. "----" = bold, "====" = form, "S" = submit button. 1. correct: <------> <===================S==> (nested) <-------> 2. incorrect: <-------------------> (overlapped) <===================S==> Since lynx insists on proper nesting, in the second example the tag would not just turn off bold text but also terminate the form -- which is what the HTML standard specifies. You get something like: 2. incorrect: <-------------------> <=========>.........s.. and the "submit button is no longer associated with the form or with any action specified by the
tag. You just get an error message when you try to activate the submit button. There are three actions that you can take: (a) The first is to forget about it and don't use the form on that site. (b) The second is to notify the webmaster of the site about the faulty HTML and suggest that they fix it. (c) The third, more difficult thing you can do is to learn enough HTML to debug these sorts of errors, download the page in question to your own site, add a tag to the top of the page, and edit the page to correct the errors. Then you can have a working form. You can combine your actions by debugging the page, putting it in your public_html directory, and then notifying the webmaster of that site where to find the corrected page. I have had webmasters of several sites correct their broken forms after I did this. (I have also had several webmasters ignore me and their sites still didn't work with lynx long after they were notified. I just looked for alternate sites.) For more on this, see: "Why Does Lynx do that?" http://www.crl.com/~subir/lynx/why.html#forms-nesting ----------------------------------------------------------------------