<META http-equiv="Content-Type" content="text/html; charset=utf-8">
I am pretty sure that there is an alterntive for:
http-equiv="Content-Type"
..but I can't remember what it is.
Does anyone know?
MrLeN
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
I am pretty sure that there is an alterntive for:
http-equiv="Content-Type"
..but I can't remember what it is.
Does anyone know?
MrLeN
Content types denote what kind of file is being transmitted over the Web. Files are tagged according to the MIME standard, using type designations like text/plain, text/html, image/jpeg, or video/quicktime. Type designations that are not officially registered have an x- prefix, like audio/x-midi or application/x-javascript. The Internet Assigned Numbers Authority (IANA) maintains the official registry of content types.I am pretty sure that there is an alterntive for:
http-equiv="Content-Type"
They are sometimes referred to as mime types, maybe that is causing the confusion?
MIME content types are the standard way of denoting the nature of a file transmitted over the Web. Originally, the e-mail protocol supported only plain text. MIME (Multipurpose Internet Mail Extensions) were originally devised to tag e-mail with content types, allowing people to send images, audio, video, programs or other sorts of files. Over time, these content types were used to label content types in many other Internet protocols.
Source
There is a great explanation of the correct way to "serve up" XHTML with the correct mime type here:
Serving up XHTML with the correct MIME type
A PHP code sample is illustrated showing how you might deliver the correct header appropriate to the host server.
Useful Reference:
Mime Types List - shows you a list of common MIME types and their corresponding file extensions.
The important thing to remember is the purpose of the Content-type meta tag. By using the Content-type (mime type), you are effectively telling a user agent (Web browser, PDA, etc) what sort of content is contained within your document. This can be read from the document's header without the need to explore the body of the file.
Yeah, but when I run my tidy tool it tells me:
I think I get this arror because this tag is meant for xhtml.Warning: <meta> unrecognized attribite value "http-equiv"
All I am trying to do is display the doctype. The one I have works fine, and validates at W3C:
I am 1000.1% sure that I came across this problem before and found alternative code to use, that didn't get rejected by my tidy tool.<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
I just can't quite remember. All I am looking for is for a valid way to include the charset for html 4.0
MrLeN
Have you tried using the typical Western Latin (1) charset? OR just using lower-case?
trailing end slash is just for XHTML, you can remove for HTML 4.0Code:<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
Personally, I would validate by the W3C standards rather than HTML Tidy, however neat a utility it may be! :o)
Useful reference for international charsets
Paul
I am validating with W3C and I am using:
..and it's all cool. It wont validate with the trailing back slash of course, so I removed it.<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
However, every time I try to tidy a page, which I do after editing, every time, to make sure that there aren't any rogue <div>'s it takes away the http-equiv="Content-Type" part :(
I am using the Tidy Tool that comes with 1stPage
The tidy tool is pretty popular, as far as I know. It was written by Dave Raggett of W3C, but it has a copyright of 1999. Maybe in 1999 http-equiv="Content-Type" wasn't used?
Anyway, I am absolutely convinced that there's another way to include the utf8 charset. I have come across this same problem before.
There's some code that W3C and my tidy tool sees as valid. I am quite sure.
MrLeN