xhtml is built off xml, the advantage right now is xhtml is much closer (read that as is the same) to html than xml is. Thats the one main thing I see we gonna end up having to learn each one of them anyways.
xhtml is an xml complient version of html. Really xhtml is not that much different than html. If you know html moving to xhtml is a snap. XML a stripped down version of SGML. It is the framework for all these web markup languages like html and xhtml. You use xml to create your own unique markup. You create the tags and and attributes.
How close is xhtml to html. I have not seen too much by way of xhtml pages.
Would it be wise for me to learn xhtml or should I stick to html?
Is there an editor for xhtml so I can see how it is set up or should I get the book for dummies?
Does xhtml require any thing special as far a programs go?
Here is a good overview of xhtml.
they also have some good reading on xml. I would highly suggest learning and beginning a switch to xhtml. It is where the web is going. Better to learn it now. Most editors can handle xhtml. Like I said it isn't that much different. It's case sensitive, all attributes must be quoted and you need doc type declarations. Thats about it. It really is an easy step fron html to xhtml.
|I have not seen too much by way of xhtml pages. |
In most cases you wouldn't know you were looking at an xhtml page unless you opened the source. They tend to carry the same .htm or .html file extension.
XML is sort of a blank canvas; you start from scratch.
Basically, you write a document with tags -- and you can call the tags anything you like, as long as they are properly nested etc. So I might create an XML document to describe a book, and it would look like this:
<blurb>Being trained by the Assassin's Guild in Ankh-Morpork... (etc)</blurb>
As it stands, I have only described the structure. A browser like MSIE will display a heirarchical tree which can be collapsed, showing how everything is nested (or an error message if they aren't).
To make proper sense of it, I'd need a document type definition (DTD), which is where the <!doctype> declaration comes in, and a stylesheet. The DTD defines what tags are allowed, what attributes they may have, how they can be nested and so forth. The stylesheet defines how the different elements are to be rendered.
XHTML, basically, is an XML application that uses an XHTML DTD and stylesheet. (In practice, if you don't include the <!doctype> declaration, most browsers will assume you want an XHTML DTD.) It is one of many XML applications: some others include PGML (Precision Graphics Markup Language), VML (Vector Markup Language), CML (Chemical Markup Language) and so on.
In xml do you need to have a seperate document stating what each tag means or will the browser pick it up. How do you define xml tags.
In xml you need either a schema or a dtd(doc type definition). The browser will never know what they mean. You either use css like normal html or use an xml parser with xsl (eXtensible Stylesheet Language). xslt (eXstensive Stylesheet Language Transformations) is the stylesheet language that will translate xml documents into xhtml that the browser can read.
here some more info
There are some great places on the web to check out. Just do a google search for learning xml or xslt.
If you are running IE and have msxml 4.0 you can do translations from your browser without any serverside parsers.
|Would it be wise for me to learn xhtml or should I stick to html? |
It would be wise for you to learn XHTML. If you already know HTML, it is not hard to make the switch [nypl.org].
|Like I said it isn't that much different. It's case sensitive, all attributes must be quoted and you need doc type declarations. Thats about it. It really is an easy step fron html to xhtml. |
Well, there are a few more things that I can think of: all tags have to be closed with the appropiate closing tag; for instance if u have a <li> tag, in XHTML having a </li> is mandatory; on the other hand, in HTML 4.01 there are tags that have NO closing tag, like <BR>; in XHTML they have to be converted to "self-closed" tags, in this case <br />; yet another interesting thing is making <input>s validate as XHTML; suppose you have something like this:
<input type="Radio" name="subject" value="JOIN" checked> which is perfectly valid in HTML, but not valid in XHTML; in order to make it validate in XHTML, it will have to look like this:
<input type="Radio" name="subject" value="JOIN" checked="checked" />
Please note both de "self-closing" string at the end of the tag AND the checked="checked" string.
I'm not sure I mentioned all "alterations" needed, but when migrating to XHTML, the W3C's validator [validator.w3.org] is a very handy tool to use, outlining every "mistake" you could have done. This along with the other very usefull links posted here should help you do the transition. Is it necessary? well, I'd rather think of it as a recommendation, but there will be a time when it will become a necessity.