Forum Posts Following Followers
25 18 33

XHTML DTD and examples

If you can read DTD (document type definitions) the XHTML spec used by TV.com at the moment appears to be here. If you can't, or don't want to be bothered, here are some examples of really simple XHTML things that are really handy. Examples: The bold, underline, and italic tags are easy to remember. Creating lists, is done like this:
  • tiger
  • snake
  • wolverine
  • drake
Here is how you do a quotation:
Ask not what your country can do for you, but what you can do for your country.
- John F. Kennedy
And here is how you can preserve white space in something you type. This is a silly example but you get the idea. Without the pre (short for preformatted) tag, all the leading and trailing and intermediate white space would be squeezed down into single spaces.
  X   X    X---+    X      +    X---+   X  X  
And if you want old-fashioned computer text like on a teletype that is how you do that. Well, that's all I know for sure works right now. The OL and DL/DT/DD, and TABLE/TR/TH/TD tags do not seem to work, unfortunately. Anyway, do a View Source command in your browser to see how these formatting tricks are done. Just look for one of the sentences in this posting. Once you find that, you can see what tags were used to create the different looks here.