Markxxx
10-12-2009, 07:24 PM
OK I am using the W3C validator and I just started out making a simple website.
I test the page and the validator passes it with a warning.
"No Character encoding declared at document level"
So I went in and used a meta tag and it worked perfectly.
But then, I read on the W3C site, that instead of using a meta tag on all your pages you could just put an htaccess in the root directory.
So I tried this
I created a file called .htaccess and put it in the root directory, called "cold"
So now in the "cold" directory I have two files
index.html
.htaccess
The htaccess says:
AddType 'text/html; charset=ISO-8859-1' html
And that is all.
When I use this form it fails to validate or rather it validates but gives me the warning back - "No Character encoding declared at document level"
Am I using the right words in my .htaccess file? I use 1and1 for my webhost and I've used htaccess files for passcodes and they work fine. I've never used the file for something like this. Any ideas what is up? Or perhaps it doesn't work with 1and1?
Thanks
I test the page and the validator passes it with a warning.
"No Character encoding declared at document level"
So I went in and used a meta tag and it worked perfectly.
But then, I read on the W3C site, that instead of using a meta tag on all your pages you could just put an htaccess in the root directory.
So I tried this
I created a file called .htaccess and put it in the root directory, called "cold"
So now in the "cold" directory I have two files
index.html
.htaccess
The htaccess says:
AddType 'text/html; charset=ISO-8859-1' html
And that is all.
When I use this form it fails to validate or rather it validates but gives me the warning back - "No Character encoding declared at document level"
Am I using the right words in my .htaccess file? I use 1and1 for my webhost and I've used htaccess files for passcodes and they work fine. I've never used the file for something like this. Any ideas what is up? Or perhaps it doesn't work with 1and1?
Thanks