HTML is rapidly being replaced by XHTML. The differences are very minor, but the results of switching can be worth the effort. The primary benefit is that XHTML is more widely accepted in non "computer" devices like cell phone, palm devices and other scaled down browsers. This is commonly called portability between devices.
XHTML is also said to be extensible, which is the fancy way of saying the new tags can be added without a new document type declaration.
Firstly, what are the differences:
the tags in the page MUST be in lower case, so instead of , as we would do in HTML, we instead use:
all tags must close, either by using a corresponding closing tag which has a slash, like paragraph (
) for example, or some tags are self closing like the above img src tag and line break (
). In HTML, many of these tags were simply left open.
all tags must be properly nested, so if you start tag "a" and then start tag "b", you must close tag "b" before you close tag "a"
some tags which were previously allowed are no longer allowed, although see the discussion below of document type declarations (DTD's).
all attributes must also be lowercase
all values for attributes must be encased in single or double quotes
all attributes must be long form, not abbreviated, for example: disabled="true" in XHTML vs DISABLED in HTML
structure must be separated from content. So for example, the
tag is a content tag (paragraph) so you can't put a table in it for example, because a table is a format construct. You can however put the
tag inside
| tags with no problem because the content goes in the construct, not the other way around.
The first thing you will notice if you look at the source of an XHTML document is that the first line is a document type declaration (DTD also called the DOCTYPE). There are three that are used, strict (that will only validate if you have no deprecated tags), transitional (which will still validate with deprecated tags) and frameset (which is for a page that "sets" up "frames"). Oddly enough, even though all tags in XHTML are lower case, parts of the DTD must be in upper case. The three DTD's look like this:
Strict -
Transitional -
Frameset -
2006-07-23 23:51:05
·
answer #1
·
answered by Anonymous
·
1⤊
0⤋
SHTML is HTML that is basically processed on the server prior to it being served in the browser. You can use it to include files to help you wiht easy changes.
For example, you can create a nav.html file to be included into an SHTML file. And then, when you add a new page, instead of changing ten pages, you only need to change one page. And then your nav will be updated on all pages. As far as building a site with SHTML - it is still HTML, but it is parsed on the server.
The Extensible HyperText Markup Language, or XHTML, is a markup language that has the same expressive possibilities as HTML, but a stricter syntax. Whereas HTML is an application of SGML, a very flexible markup language, XHTML is an application of XML, a more restrictive subset of SGML. Because they need to be well-formed (syntactically correct), XHTML documents allow for automated processing to be performed using a standard XML library—unlike HTML, which requires a relatively complex, lenient, and generally custom parser (though an SGML parser library could possibly be used). XHTML can be thought of as the intersection of HTML and XML in many respects, since it is a reformulation of HTML in XML. XHTML 1.0 became a World Wide Web Consortium (W3C)
2006-07-23 18:04:11
·
answer #2
·
answered by jasonvdklooster 3
·
0⤊
0⤋