html header-stuff, doctype and content-type

i'm preparing an e-text for submission, and need some info. here's the stuff i've got at the top of my .html file right now. [html] [head] [title]the title [/title] [/head] [body] [il] [ul] what do i need, in the form of a doctype and content-type lines, to run it through the validator? my .html throughout is minimal, and the text is all 7-bit, so i prefer to use the most basic doctype/content-type possible. thanks. -bowerbird p.s. here is the full total of the markup i'm using: [a href="#b01"][/a] ... [a href="#c56"][/a] [a href="#toc"][/a] [br /] [center][/center] [em][/em] [h1][/h1] [h2][/h2] [head][/head] [hr /] [html][/html] [il] [p id="b01"] ... [p id="c56"] [p id="toc"] [p][/p] [small][/small] [title][/title] [ul]

Bowerbird@aol.com a écrit:
i'm preparing an e-text for submission, and need some info. here's the stuff i've got at the top of my .html file right now. ... [il]
I'm not aware of any doctype that supports an <il> tag, but otherwise you might try an XHTML Transitional DTD: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /> Raniformly, Michael

Bowerbird@aol.com wrote:
what do i need, in the form of a doctype and content-type lines, to run it through the validator?
You don't *need* any, but if you care you may just grab a file from the archive and copy the stuff or else go to www.w3.org and read the specs. But, WATCH IT !!! HTML is a form of XML !!! If you reach the devil a plume it will soon swallow the whole bird. -- Marcello Perathoner webmaster@gutenberg.org

Bowerbird@aol.com wrote:
i'm preparing an e-text for submission, and need some info. here's the stuff i've got at the top of my .html file right now.
[html] [head] [title]the title [/title] [/head] [body] [il] [ul]
what do i need, in the form of a doctype and content-type lines, to run it through the validator?
<?xml version="1.0" encoding="us-ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> I would strongly recommend that you get a hold of HTMLTidy (http://tidy.sourceforge.net). Tidy will validate your HTML better than W3C's online validator (which is known to be incorrect in at least one particular), fix the errors that it can (reported as warnings), flag the errors it cannot (reported as errors with line numbers), _and_ add the correct XML header/DTD to the file. If you use the '--output-endoding ascii' option it will guarantee that any non-ASCII character that may have slipped in will be properly converted to a character entity. Note that if your file truly _is_ 100% ASCII you could use "utf-8" or "iso-8859-1", or even "windows-1252" in place of "us-ascii", because for values less than 128 all three of these encoding methods are identical.

At 09:34 AM 15/09/05 -0600, you wrote:
I would strongly recommend that you get a hold of HTMLTidy (http://tidy.sourceforge.net). Tidy will validate your HTML better than W3C's online validator (which is known to be incorrect in at least one particular),
what particular is this? enquiring minds would like to know JHowse

<?xml version="1.0" encoding="us-ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> I would strongly recommend that you get a hold of HTMLTidy (http://tidy.sourceforge.net). Tidy will validate your HTML better than W3C's online validator (which is known to be incorrect in at least one particular), fix the errors that it can (reported as warnings),
Using Tidy to detect and flag errors is no problem. But please, don't use it to fix errors. Tidy's output is hard to read by humans, and if something has to be corrected it's a pain. The WWers really don't like it, and have all the reasons to. Frank
participants (6)
-
Bowerbird@aol.com
-
Frank van Drogen
-
JHowse
-
Lee Passey
-
Marcello Perathoner
-
Michael Ciesielski