Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Html, Xhtml, Dtml?

    So what is the difference between all three?

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    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.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What he said...

    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.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #4
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #5
    New Coder
    Join Date
    Jan 2004
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •