Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

Thread: What is XHTML

  1. #1
    Senior Member Bazrazmataz's Avatar
    Join Date
    Jan 2004
    Location
    Newcastle England
    Posts
    341
    Member #
    4454
    Hi

    So many people ranting on about XHTML 1.0 compliance what the hell is this?

    How can you adjust your sites to make them compliant is it simply changing the code or do you need to start again coding in this XHTML ?

    Im clueless here
    Whats the matter the CIA got u pushing too many pencils ???

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    XHTML is a cleaner version of HTML, and will eventually replace HTML. There are only small things you must follow to be XHTML compliant, such as making sure all img tags are closed like so: <img />.

    This may help: http://www.w3schools.com/xhtml/xhtml_syntax.asp
    JR

  4. #3
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    HTML is very loosely typed, and accepts lots of errors (as the browsers corrects them)
    as an examle you can have open tags or close tags in the wrong order, without generating errors, like the example below:
    Code:
    <body>
    Here's som text.
    <p> Here's a new paragraph without a closing tag
    <b><i>here's some text with wrong tag closing order</b></i>
    Here's a unclosed break line <br>
    </body>
    XHTML is more type strict, and derives rules from XML (hence XHTML).
    While XML is caps sensitive, XHTML is not, in the sense that it only allows lowercase letters in elements.

    It's a step towards making HTML and XML more compatible with each other.
    XML can be used as a substitute (in many situations) for databases, and acts as a crosplatform information exchanger. HTML is by todays standards, good for nothing except serving web pages to browsers. If they become more structured, they might interact with XML and data-transfer/storage much better than today.

    You won't neccessarily need to rewrite all your pages to make them XHTML compliant, but you need to make sure they follow XHTML's more strict rules.

    If you do a Google search fro XHTML versus HTML, you will find loads of information.

    EDIT:
    Your reply came as I was typing this JR :cheeky:
    S. Rosland

  5. #4
    Senior Member ceetee's Avatar
    Join Date
    Jul 2003
    Posts
    117
    Member #
    2035
    XHTML is a subset of XML for browsers which isn't used at the moment because IE doesn't recognise it. Sites that have the W3C XHTML sticker are saying this page would be valid if it was XHTML.

  6. #5
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Quote Originally Posted by ceetee
    XHTML is a subset of XML
    All markup languages are a subset of XML. Whether they're valid is another story.

    Quote Originally Posted by rosland
    HTML is very loosely typed, and accepts lots of errors
    Actually, that's not true. The HTML spec was just as strict as the XHTML spec. Invalid HTML is still invalid. The only thing is that the browsers would display it correctly. And guess what? The browsers will display invalid XHTML correctly, too.

    ----------------------------------------------------------

    In answer to the question, XHTML is an HTML specification that uses XML DTDs and XSDs to enforce proper HTML coding with XML validation tools. Because XML is a superset of all markups, it was retrofitted to encompass HTML.

    At the same time, though, HTML had to be updated by changing stand-alone elements like the <img /> and <input /> and <br /> to close themselves with a trailing slash. This is the only structural part of XHTML that doesn't exist in HTML.

    Finally, the XHTML strict schema eliminates many of the attributes that you're used to working with. For instance, you cannot specify width="" or bgcolor="" for a <td>. The reason is that XHTML wants to enforce CSS. The XHTML transitional schema allows those attributes, because W3C realizes that in the real world, those attributes are necessary for backwards compatibility. For now, you should still use CSS and attributes for most of your design.

    The bad part is that even in XHTML transitional, some of the "made up" attributes that we've gotten used to working with, such as <body> margin attributes, are not supported. The reason for this is that those attributes were never made a part of the W3C HTML specification, even though all browsers supported some implementation of them. That's just the way it is.

  7. #6
    Senior Member teal's Avatar
    Join Date
    Dec 2003
    Posts
    247
    Member #
    4319
    That's . . . a lot of words. Indeed.
    Anyway, it seems to me that XHTML's new, strict rules will probably never be inforced, since it is always nicer to just allow user mistakes. Really, whatever works, even if the other programmers don't think it is pretty.
    Whoth steps forth to mock the teal? Whom couldst say a color superior!

    Proclamith me, it cannot be done.

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    teal,

    That's very true. Although XHTML (when created as XHTML) may at some time be enforced when specifically declared as <?xml with the correct DTD or XSD specified, it is feasible to assume that all browsers will continue to support invalid HTML as well.

    Why? Well, backwards compatibility, man. There are HTML elements that have been deprecated for YEARS that are still supported (like the <xmp> element) that no one even uses anymore that are still supported by browsers!!! They HAVE to support them, because when they STOP supporting them, there will be some (or many) websites that will look like crap when using the browser, and they will lose some of their market to the competition. Browser makers don't want to lose their market, so they create browsers that support everything... even deprecated elements and invalid HTML. Make sense?

  9. #8
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    this might help you out with "converting" your site from HTML to XHTML... it's nothing complicated you'll see

    http://www.w3.org/TR/xhtml1/#diffs
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  10. #9
    Junior Member Unorthodox's Avatar
    Join Date
    Jan 2004
    Posts
    28
    Member #
    4736
    Quote Originally Posted by Bazrazmataz
    Hi

    So many people ranting on about XHTML 1.0 compliance what the hell is this?

    How can you adjust your sites to make them compliant is it simply changing the code or do you need to start again coding in this XHTML ?

    Im clueless here
    XHTML = Extensible Hypertext Markup Language
    http://www.Unorthodox.cc

  11. #10
    Senior Member jlgosse's Avatar
    Join Date
    Jan 2004
    Location
    Newfoundland, Canada
    Posts
    1,037
    Member #
    4570
    Liked
    7 times
    Check out how W3Schools handles the situation. They explain it pretty well, I think.

    I do have some beefs with XHTML though, as they do get rid of something, oddly enough, that alot of people like to use.



Page 1 of 3 1 2 3 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:47 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com