Re: Help Required: No Character encoding declared at document level

On 03/30/2009 12:35 PM, O'Keefe.Michael wrote:
> Hi,
> 
> Sorry I can't post the URL as the page is on our Intranet site but the
> page header section is below.
> 
> I am in the process of converting our site from HTML 4.01 to XHTML 1.0
> Strict and use the Direct input option on
> http://validator.w3.org/#validate_by_input to validate the pages.
> 
> Today, for the first time, I got the following two warnings and don't
> know why.
> (1) No Character encoding declared at document level
> (2) Using Direct Input mode: UTF-8 character encoding assumed
> I solved this second warning by adding the line < meta
> http-equiv="content-type" content="text/html" charset="utf8"> but the
> first error still remains.
> Does anyone know why all the previous pages passed without this line?
> 
> As a test, I revalidated several pages that has previously passed with
> no errors nor warnings and got the same errors.
> 
> Could someone point me in the right direction on resolving this? Thanks
> in advance!!!
> 
> _____________________________________________________
> Here is my header...
> 
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
> <head>
> <title>Health and Safety Minutes - Windsor - January 2009</title>
> < meta http-equiv="content-type" content="text/html" charset="utf8">
> <meta name="dc.title" content="Health and Safety Minutes - Windsor -
> January 2009" />
> <meta name="dc.subject" scheme="gccore" content="Minutes" />
> <meta name="dc.date.created" content="2009-03-30" />
> <meta name="dc.date.modified" content="2009-03-30" />
> <meta name="dc.language" scheme="ISO639-2" content="eng" />
> <link href="/style.css" rel="stylesheet" type="text/css">
> </head>
> 
> 
> 

You're missing this at the top of the file:
<?xml version="1.0" encoding="utf-8" ?>

Also, the META element on line 6 and the LINK element on line 13 are not 
properly closed.

Received on Monday, 30 March 2009 19:58:41 UTC