I just started to learn. I can't get the code in my CSS file to link to my HTML file to produce the web page I want.
The code I've used is;
<link rel="stylesheet" type="txt/css" href="bkkcss.css /">
And in the CSS sheet is;
body
{margin:0;
padding:0;
background-color:##003300
}
And when I validate I get the following which I don't fully understand;
The validator has found the following problem(s) prior to validation, which should be addressed in priority:
Missing "charset" attribute for "text/xml" document.
The HTTP Content-Type header (text/xml) sent by your web browser (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)) did not contain a "charset" parameter, but the Content-Type was one of the XML text/* sub-types.
The relevant specification (RFC 3023) specifies a strong default of "us-ascii" for such documents so we will use this value regardless of any encoding you may have indicated elsewhere.
If you would like to use a different encoding, you should arrange to have your browser send this new encoding information.
Conflict between Mime Type and Document Type
The document is being served with the text/xml Mime Type which is not a registered media type for the XHTML 1.1 Document Type. The recommended media type for this document is: application/xhtml+xml
Using a wrong media type for a certain document type may confuse the validator and other user agents with respect to the nature of the document, and you may get some erroneous validation errors. How to fix this problem? One of the following techniques should help:
If you are serving a static file on a Web server, changing its extension should help. Use e.g .xhtml for XHTML or .mathml for MathML.
You may need to reconfigure your Web server. This Setting up MIME Types tutorial has instructions for Apache, Tomcat and IIS.
If the document is generated dynamically, the scripting language should allow you to set up the mime type: this article on MIME Types and Content Negotiation has examples in PHP, Perl, and ASP.
I am in an internet place in Bangkok so maybe the browser isn't very good. I've tried Firefox and IE.
When I put the CSS code and HTML code in the same file I'm getting things to work ok.
Regards
Jim Walsh