Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ZicklePop

macrumors member
Original poster
Mar 28, 2005
98
0
Hey can you guys tell me what I need to change to become valid html?

Result: Tentatively passed validation
File: test.html
Encoding: utf-8
Doctype: -//W3C//DTD HTML 4.01 TRANSITIONAL//EN

Unknown Parse Mode!
The MIME Media Type (text/html) for this document is used to serve both SGML and XML based documents, and it is not possible to disambiguate it based on the DOCTYPE Declaration in your document. Parsing will continue in SGML mode.

No DOCTYPE found!
Attempting validation with HTML 4.01 Transitional.
The DOCTYPE Declaration was not recognized or is missing. This probably means that the Formal Public Identifier contains a spelling error, or that the Declaration is not using correct syntax. Validation has been performed using a default "fallback" Document Type Definition that closely resembles "HTML 4.01 Transitional", but the document will not be Valid until you have corrected this problem with the DOCTYPE Declaration.

This Page Is Tentatively Valid -//W3C//DTD HTML 4.01 TRANSITIONAL//EN
The uploaded document "test.html" was checked and found to be tentatively valid -//W3C//DTD HTML 4.01 TRANSITIONAL//EN. This means that with the use of some fallback or override mechanism, we successfully performed a formal validation using an SGML or XML Parser. In other words, the document would validate as -//W3C//DTD HTML 4.01 TRANSITIONAL//EN if you changed the markup to match the changes we have performed automatically, but it will not be valid until you make these changes

The code I have for this so far is:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
What else do I need to become valid?
 

ZicklePop

macrumors member
Original poster
Mar 28, 2005
98
0
The code I provided is only the code that I think could be affecting it.
 

ChrisBrightwell

macrumors 68020
Apr 5, 2004
2,294
0
Huntsville, AL
Just to confirm ...

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  </head>
  <body>
    Hello, world!
  </body>
</html>
That's how you have it written, right? Everything has to be in the right place for the parser to do its job.
 

tag

macrumors 6502a
Apr 29, 2005
918
9
ZicklePop said:
The code I provided is only the code that I think could be affecting it.

Ok, Im not positive this is why but I'm pretty sure... in the first line you have 'TRANSITIONAL' capitolized. I changed it on my webpage to caps, and I got errors now too(I really didn't think caps mattered but I'm not up on doctype stuff), so give it a try replacing

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">

with

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

And also make sure your 'meta' tag is between <head></head> and not right after the !DOCTYPE
 

ZicklePop

macrumors member
Original poster
Mar 28, 2005
98
0
ChrisBrightwell said:
Just to confirm ...

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  </head>
  <body>
    Hello, world!
  </body>
</html>
That's how you have it written, right? Everything has to be in the right place for the parser to do its job.
Yes sir!
tag said:
Ok, Im not positive this is why but I'm pretty sure... in the first line you have 'TRANSITIONAL' capitolized. I changed it on my webpage to caps, and I got errors now too(I really didn't think caps mattered but I'm not up on doctype stuff), so give it a try replacing

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">

with

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

And also make sure your 'meta' tag is between <head></head> and not right after the !DOCTYPE
Nice! Thank you it worked :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.