...

View Full Version : Html, Xhtml, Dtml?



iKwak
01-20-2004, 09:44 AM
So what is the difference between all three?

Spudhead
01-20-2004, 12:18 PM
HTML is the bogstandard markup language, been around for years, etc etc etc..

XHTML is a kind of new, improved HTML that's more XML-compliant (hence the "X"), and which, as far as i can make out, consists of taking any tag that doesn't have a closing tag (like <br>) and giving it a closing slash (like </br>).

DTML is a new one to me. However, DHTML stands for Dynamic HTML and is a bit of a buzzword for the merging of your old stylee HTML with JavaScript and CSS to produce all those nifty little effects that are dotted all over modern webpages, and of which drop-down/slide-out/pop-up/fade-in navigation menus are a fairly typical example. DHTML has been round for years, too.

ronaldb66
01-20-2004, 12:40 PM
All of what Spudhead said, and then some:

XHTML 1.0, according to the W3C is "HTML 4.01, reformulated as an XML application", which means is has to comply to XML rules, like closing all elements with an end tag and closing empty elements with "slash-bracket", and enclosing all attribute values in quotes.
Although in XML capitals are fine, the XHTML recommendations demand the strict use of lowercase characters for elements, attributes and value literals.
Where XHTML 1.0 brought nothing really new, XHTML 1.1 etc. continue to extend the last true HTML recommendation.

DHTML is not a standard or recommendation, nor a language; it's just a term.

me'
01-20-2004, 04:48 PM
An 'empty' tag is like <img>, <br> and <input> &mdash; a tag that doesn't have an end tag. In XML, all tags MUST be closed, so we comprimise and say that if a tag is empty, you must close it with a forward slash before the final &gt;, ie: <br/> (NOT </br> as Spudhead said). In XHTML, a lot of older browsers have to interpret it as HTML, and so instead of saying <br/>, where the browser would think the / is part of the tag name, we often say <br />, when it would think the / is an attribute name, one that it doesn't recognise, and it would ignore it.

XML is case sensitive ('xml' isn't the same as 'XML'), which means that XHTML is also case sensitive, and so, <input /> isn't the same as <INPUT />. In XHTML, no tag called '<INPUT>' exists &mdash; the tag is called <input />, and that is what you must use.

Also, in XML (and therefore XHTML), all attribute values must be quoted with either " or '. Most people use ", but there's no difference either way.

spufi
01-20-2004, 06:08 PM
The order in which tags open and close is also important. This is vaild HTML.

<span><b>Text</span></b>

That, however is not valid XHTML because the outer tag(span) was closed before the inner tag(b) was.

Because of the extra rules XHTML has, it tends to be easier to read than HTML.

Roy Sinclair
01-20-2004, 07:09 PM
Originally posted by spufi
The order in which tags open and close is also important. This is vaild HTML.

<span><b>Text</span></b>

That, however is not valid XHTML because the outer tag(span) was closed before the inner tag(b) was.

Because of the extra rules XHTML has, it tends to be easier to read than HTML.

Actually that's never been valid html either, just because some browsers were written to be ignorant enough to accept it didn't make it valid.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum