[thelist] embarrassingly stupid XHTML questions

Morbus Iff morbus at disobey.com
Mon Sep 17 14:35:32 CDT 2001


 >1. When writing a page in XHTML, does one save the page as .html, or .xhtml?

HTML. Although it may seem semantically correct to save it as .xhtml, it's 
nonstandard, and you may cause problems with older browsers that don't know 
how to process it (assuming the webserver doesn't send the correct Content 
Type).

Dummy: I'd play it safe and stick with .html.

 >2. If XHTML pages can be "transitional," can they also be something else? If
 >so, what? And how do you know which one to state in the <head> of the
 >document?

They can be "Strict", which, for example, would mean that the following two 
tags wouldn't work (of course, there are more):

	<center> 	<div align="center">

Which one to state is really a matter of how anal you want your pages to 
be. "Transitional" assumes that you're know HTML and that you've grown up 
using FONT, and CENTER, and all those design oriented tags. "Strict" 
assumes that all your design is done in stylesheets (and oh so much more - 
I'm kinda dummying "Strict" unfairly).

Dummy: "Strict" may be to hard and to anal for most people.
"Transitional" is a good choice (I use it myself).

 >3. What are unicode and UTF-8, and how do I know what I am using? I've never
 >made a conscious decision on this.

Dummy: I'm dumb. Although I have an inkling of an answer on this, I'd 
rather not shoot both you and I in the foot. The way I've been handling it:

  - just a generic web audience, I always encode all entities
    to their HTML equivalent (like &copy; &amp; and so forth).

  - catering to foreign people, I encode the document to
    UTF-8 (see the source of disobey.com/amphetadesk/ for an
    example) and encode most entities to numeric equivalents
    (of which I can't remember any off the top of my head).


--
Morbus Iff ( i am your scary godmother )
http://www.disobey.com/ && http://www.gamegrene.com/
please me: http://www.amazon.com/exec/obidos/wishlist/25USVJDH68554
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus







More information about the thelist mailing list