There was 1 error and 4 warnings in my page. The error was that I didn’t have a document type declaration at the beginning of my page. Normally pages I create I use a template which includes this tag, however, it should have been something I remember to add to all pages. If you are using a web editor this tag is automatically added to the page.
The code that should have been added inside the header tag. The error is below:
Line 1, Column 1: no document type declaration; implying ""
The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with a fallback DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.
The warnings also relate to the same tag:
1. No Character Encoding Found! Falling back to UTF-8.
None of the standards sources gave any information on the character encoding labeling for this document. Without encoding information it is impossible to reliably validate the document. As a fallback solution, the "UTF-8" encoding was used to read the content and attempt to perform the validation, but this is likely to fail for all non-trivial documents.
2. Unable to Determine Parse Mode!
The validator can process documents either as XML (for document types such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions). For this document, the information available was not sufficient to determine the parsing mode unambiguously, because:
* the MIME Media Type (text/html) can be used for XML or SGML document types
* No known Document Type could be detected
* No XML declaration (e.g ) could be found at the beginning of the document.
* No XML namespace (e.g ) could be found at the root of the document.
As a default, the validator is falling back to SGML mode.
3. No DOCTYPE found! Checking with default HTML 4.01 Transitional Document Type.
No DOCTYPE Declaration could be found or recognized in this document. This generally means that the document is not declaring its Document Type at the top. It can also mean that the DOCTYPE declaration contains a spelling error, or that it is not using the correct syntax.
The document was checked using a default "fallback" Document Type Definition that closely resembles “HTML 4.01 Transitional”.
4. No Character encoding declared at document level
No character encoding information was found within the document, either in an HTML meta element or an XML declaration. It is often recommended to declare the character encoding in the document itself, especially if there is a chance that the document will be read from or saved to disk, CD, etc.
Validation Output: 1 Error
The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with a fallback DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.
Once I added these tags, the page was successfully checked as XHTML 1.0 Transitional. In the image below note the tag at the top of the page and the meta tag inside the header tag.
References:
Allen, M.. (n.d.). "Module 3 Contributing to the Infosphere". Retrieved July 12, 2009 from http://lms.curtin.edu.au/webapps/blackboard/content/listContent.jsp?course_id=_18825_1&content_id=_985242_1


No comments:
Post a Comment