There are foreign symbols in one of my html files, so the meta charset
must be:
>
But either online or off, the external css works well only when the
file is opened with the IE browser. When it opened with FF, the
external css doesn't work at all. No markup takes effect. The file
is in:
http://www.pinyinology.com/zidian3/n.html
Your help is greatly appreciated.
fulio pen
Re: Files having foreign symbols
am 27.05.2007 00:34:06 von dorayme
In article
<1180215971.642242.215230@w5g2000hsg.googlegroups.com>,
fulio pen wrote:
> There are foreign symbols in one of my html files, so the meta charset
> must be:
>
>
> >
>
> But either online or off, the external css works well only when the
> file is opened with the IE browser. When it opened with FF, the
> external css doesn't work at all. No markup takes effect. The file
> is in:
>
> http://www.pinyinology.com/zidian3/n.html
>
> Your help is greatly appreciated.
>
> fulio pen
You know that you have an inappropriate (for the doctype) " /> at
the end of your above meta line?
First thing to do is to fix up the errors in the mark up.
--
dorayme
Re: Files having foreign symbols
am 27.05.2007 02:30:56 von cwdjrxyz
On May 26, 5:34 pm, dorayme wrote:
> In article
> <1180215971.642242.215...@w5g2000hsg.googlegroups.com>,
> fulio pen wrote:
>
>
>
> > There are foreign symbols in one of my html files, so the meta charset
> > must be:
>
> >
>
> > But either online or off, the external css works well only when the
> > file is opened with the IE browser. When it opened with FF, the
> > external css doesn't work at all. No markup takes effect. The file
> > is in:
>
> >http://www.pinyinology.com/zidian3/n.html
>
> > Your help is greatly appreciated.
>
> > fulio pen
>
> You know that you have an inappropriate (for the doctype) " /> at
> the end of your above meta line?
>
> First thing to do is to fix up the errors in the mark up.
>
> --
> dorayme
Also, in several places in the code, xhtml constructions such as
> or are used for this html4.01 document. Often this does no
harm, but not always. Also a space before the "/" at the end of a tag
is required for an xhtml tag that does not have a closing tag in html.
I believe this space was required because some browsers had trouble
with this xhtml construction if no space here was used. I have not
checked recent browsers to see if any still have this problem. In this
case, the solution is simple. You just replace all of the self-
contained xhtml end tags such as with the proper one for html
4.01 used in this document such as . If I remember correctly, you
do not need the space in a smil document which is somewhat more modern
code than early xhtml 1.0 and which usually is supported by a special
player/viewer rather than directly by a browser.
Re: Files having foreign symbols
am 27.05.2007 16:00:44 von jkorpela
Scripsit fulio pen:
> There are foreign symbols in one of my html files, so the meta charset
> must be:
>
>
No, that's quite an incorrect idea. You should specify the character
encoding that has actually been used in the document. The encoding is
apparently UTF-16, so that's what you should specify. Actually, modern
browsers can infer UTF-16, so you could really mess things up if you used a
meta tag like the above. But you were lucky since your mistakes cancel each
out: you have a misplaced quotation mark, so that the meta tag has no
effect; the content attribute has the value
"text/html; charset="
and then gb2312 is taken as another attribute, and ignored because there is
no such attribute.
(By the way, a markup validator would have told all this, though somewhat
less clearly.)
("Foreign symbols"? Referring to Chinese characters as "foreign" in a
worldwide context is odd, since they are native characters to about one
billion people.)
> But either online or off, the external css works well only when the
> file is opened with the IE browser. When it opened with FF, the
> external css doesn't work at all. No markup takes effect.
That's because FF has more adequate error processing. Remmber the extra
quotation mark? It also implies that the last quotation mark in
actually starts a quoted string. This means that processing of quoted
strings gets off the phase and very wild, and the element is not
really processed at all.
The immediate fix would thus be either to remove the meta tag or change it
to
More advice:
1) Drop XHTML 1.0. You're not even using it formally correctly. Stick to
HTML 4.01, consistently. Use either XHTML or HTML 4.01; don't mix them in
the same file (you now even use both syntaxes in meta tags).
2) Switch to UTF-8, which is much better supported than UTF-16, especially
in search engines. This means changing your authoring program to change the
actual encoding _and_ declaring UTF-8 encoding in an HTTP header and/or a
meta tag.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/