Forum Moderators: open

Message Too Old, No Replies

Content types

Huh?

         

zoobie

2:27 am on Jun 18, 2003 (gmt 0)

10+ Year Member



I've seen several out there...My server says it's putting out <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">

Questions=
Should I use the above or another?
What if it's a php page with html on it?
Where does us-en go if anywhere?
What about script pages for example mail.php which just runs a script and doesn't display anything?

Thanks

outrun

9:02 am on Jun 18, 2003 (gmt 0)

10+ Year Member



Its for your browser to discern the content type and its character set. If you browser is never going to display the page you dont need it, but if your browser is going to render it you do need it for, php, asp or whatever.
Another popular character set is us-ascii or in the meta tag

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">

It is also part of the W3 standards.
regards
Mark.

grahamstewart

9:20 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The above should be fine although iso-8859-1 is more common.

> What if it's a php page with html on it?

Doesn't matter - the browser never sees the php.
Content type is for describing what character set you are sending information to the browser in.

> Where does us-en go if anywhere?

You can specify it in your HTML by using the lang attribute.

e.g.

<html lang="en-us">

or even

<span lang="fr">C'est la vie</span>

Note: its en-us not us-en
Believe it or not American is a subset of English, not the other way around :)

zoobie

10:52 am on Jun 18, 2003 (gmt 0)

10+ Year Member



Spank you very much, helpy helpertons! }:^)