Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: TECH: dumb html question

From:Mark J. Reed <markjreed@...>
Date:Monday, January 12, 2004, 13:34
RM> http://cinduworld.tripod.com/supplement.htm under the word "kikayoka" there
RM> is a botched IPA rendering "['kjok?]".  That "?" should be a schwa (hex
RM> 0259, dec. 601).  Is "&#601;" the correct way to encode that?

Yes.  You could also use &#x0259;, which is arguably more useful since
most Unicode references give the code points in hex.

RM> Then, do I have to change the "charset=iso-8859-1" to something else?
RM> (utf-8 according to one website).

Yes.  The charset= parameter tells the browser how numeric entities
are to be interpreted.  For instance, in ISO-8859-1, &#191; =
&iquest; = ¿ (inverted question mark).  But in ISO-8859-2, &#191
= ż (z with overdot), for which no entity name is defined, and
the character ¿ doesn't even exist.    If you're using Unicode
characters, even if you only encode them as HTML entities and not
as UTF-8, you should set the character set to "utf-8".

Having said that, I should note that even though this is technically
required, most browsers will automatically interpret numeric entities
with values >255 as Unicode no matter what charset is set to.


RM> And if I do that, do I have to change all the
RM> other "&ccedil;", "&aacute;" etc. to numerics??

No, no, not at all!

RM> Does "&schwa;" exist?

Nope.  Although one of the nice things about XHTML is that XML lets you
define your own entities, so that you can add it if you like.

BPJ> I would prefer &#0601 and charset="UTF-8".  I know for a fact that that
BPJ> works...

Leading 0's on decimal numbers is a bad idea because computer-savvy folks who
have programmed in C or any of the many languages inspired thereby will
be likely to interpret the number as octal (base 8) - as will many
programs if anyone writes one to parse your page.

BPJ> BTW is there a how-to for external style sheets out there?
BPJ> In particular I'm not sure about the format of the stylesheet itself.

Several.  What you're looking for is CSS.   The stylesheet should be
named something.css; your web server should be configured to serve .css
files as MIME type "text/css"; and it consists of a bunch of lines of
the form

        what-to-apply-the-style-to { param: value; param2: value; }

Where "what-to-apply-the-style-to" can be the name of an HTML tag,
and/or a period followed by a class name (which you put elements in with
class="name" in the HTML) and/or a '#' followed by an element ID (which
must uniquely identify exactly one element, and is given by using
id="ID" in the HTML).

-Mark

Replies

John Cowan <cowan@...>
Mark J. Reed <markjreed@...>
Benct Philip Jonsson <bpj@...>