Slashdot Mirror


Why You Should Use XHTML

Da_Slayer writes "The w3's HTML group has released the 6th public working draft for XHTML 2.0. XHTML 2 is a general-purpose markup language designed for representing documents for a wide range of purposes across the Web. Meaning it is to be used for document structuring which is why it does not have presentation elements. The draft is located at w3's website. Also they have a FAQ about why you should use XHTML over HTML. It goes into specifics about embedding MathML, SVG, etc... and has links to tools and resources to help convert existing html documents to xhtml. One of those resources is a document on XML events and its advantages over the onclick style of event handling."

12 of 657 comments (clear)

  1. You have to wonder... by Dozix007 · · Score: 4, Interesting

    You have to wonder if Microsoft will be implimenting this new standard in IE. I have done some webdevelopment and have really noticed that they rarely impliment any of the standards in there browser. Not to mention that they are on the board that approves these standards :P

  2. Is this really going to happen? by Defiler · · Score: 4, Interesting

    I've been using XHTML for some time, but only in the modes that safely fall back to HTML for browsers that don't "speak" XHTML.
    I have to wonder if 2.0 is going to catch on. Internet Explorer isn't likely to support it any time soon, and nobody wants to code two versions of every web application.
    Still, good FAQ on that site. I learned some details that had been hazy.

  3. /. should lead the way by pohl · · Score: 5, Interesting

    With all the time we spend hearing about alternatives to IE around here, you would think that slashdot would be compliant to at least some W3C standard. If /. were some tiny hobby weblog this would be forgivable, but /. could use the size of it's audience to actually lead. Why not do it?

    --

    The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

  4. Re:XHTML and XML?? by pete-classic · · Score: 4, Interesting

    Good answer ;-)

    The grandparent might also interested in the following:

    XHTML is implemented in XML. So XHTML is to XML as OpenOffice.org's writer format is to XML. (Or as HTML is to SGML, or as this post is to English.)

    People often say somthing is XML when it is really implemented in XML. Using that (misleading) terminology XHTML is XML.

    -Peter

  5. Re:Why You Should Use XHTML 2.0 ???? by JimDabell · · Score: 3, Interesting

    Something better would be to use pure XML for creating content and then let the browser apply a CSS to present the content.

    No, that would be very much worse. The whole point of a publically specified XML application like XHTML is that everybody understand what the element types mean. If you go around inventing your own element types, nobody will no what you mean. Google understands <h1> as being more important than normal text. It won't understand <my-fancy-heading> in the same way.

  6. No, XHMTL is broken by AuMatar · · Score: 3, Interesting

    You forget the original purpose of HTML. HTML's purpose, and the reason it grew so quikly, was to be an easily understood markup language that could be used by less technical people. The reason so many people were able to make their own homepages and grow the web like they did was that HTML could be easily learned.

    Now we have XHTML and CSS. Neither of these are easy to learn. Neither of them is easy to use. Less technical people are incapable of using either. This is great for job security for webmasters, but for the growtrh of the next and for the internet as a medium of free and easy communication its horrible. XHTML is broken as an HTML replacesment because it does not meet the original purpose of HTML- to be something that anyone can easily learn and use.

    --
    I still have more fans than freaks. WTF is wrong with you people?
    1. Re:No, XHMTL is broken by T-Ranger · · Score: 3, Interesting
      I dont know that that was HTMLs purpose. I keep hearing people say that, and it being "easy" may be true, but I dont know that that was its goal.

      HTML is NOT easy. Writing a valid HTML documenta 20-30 lines long by hand is possible, but for any non-trivial page it is near impossible. (that there are no good HTML editors is besides the point). Any website containing more then 1 page should use some kind of automation to create HTML, be that continiously generated dynamic pages, or generating the HTML once per change. Spreading the rumor that HTML is easy to learn and that anyone can, and should, use HTML is a disservice to humanity.

      If you are a non-technical person, or even a technical person whose job is not specificly HTML creation software writing, then you should not generate HTML by hand. Use some kind of CMS. Use some HTML editor. Use Docbook and "compile" HTML.

      Why are Wiki's popular? Because they use a markup language that actually is easy, one that is hard to screw up.

      Please, pleae, please, dont continue to spread the lie that HTML is easy enough for anyone to learn.

  7. Re:Ugh by Kentamanos · · Score: 4, Interesting

    I would argue learning XHTML is easier than HTML since the rules are a LOT more straightforward.

  8. XHTML/CSS is picking up steam... by Saeger · · Score: 3, Interesting
    I've been "coding" to XHTML transitional for a few years now, and have noticed recently that a lot of the sites being created or redesigned now are also opting for it rather than the old HTML401.

    There's really not much to it:

    • All tags are lowercase, which is easier to type anyway
    • All attributes have to be "quoted" for sanity
    • All tags have to be terminated, like this lists </li> which makes the browsers job of rendering much easier since it doesn't have to play the guessing game. This is especially handy on lowend devices like PDAs.
    • All the old bandwidth-wasting presentation elements (like <FONT>) are now CSS presentation ATTRIBUTES of any element by using id= class= and style=

    Firefox's WebDeveloper extension makes XHTML/CSS validation (among other funcs) so easy that there's no excuse to be lazy about it.

    --

    --
    Power to the Peaceful
  9. Re:Ugh by kirkjobsluder · · Score: 3, Interesting

    Gee, am I the only one who has been writing xhtml in vim for a while now?

    It's not that hard to do.

    1: add the doctype at the top.
    2: always close your tags.
    3: check you work with a validator.

    html tidy will also identify and clean up any mistakes.

  10. Re:XHTML and XML?? by Christianfreak · · Score: 3, Interesting

    You're kidding right?

    First off, Ma and Pa Kettle haven't cranked out their own web page in notepad since about '97 or so. Nowadays they use FrontPage for that which produces something akin to code soup.

    Secondly I don't understand why new syntax precludes anyone. Learning new things is not difficult. I write valid XHTML 1 code by hand, it isn't very hard, in fact its much easier to control the elements than it used to be, and produce nice looking sites that downgrade nicely for people using broken (IE) browsers.

    It makes everyone's life easier if there is a standard that is followed. You don't expect a programming language to know what to do with invalid syntax do you? Why should your data language be any different?

  11. Re:Has anyone tried coding a site in pure XHTML/CS by shift1978 · · Score: 3, Interesting

    So you say that website with tables used for design are more easy to read ? Are you sure ?
    Have you ever work on the website of another person, company, project using table for design ? It sis totally impossible to maintain it without losing much time.

    Now about the goal of a website, it is not to look good but to provide information. Now if it look beautiful too it is better. But information is the main point and accessibility - I mean information for everybody (blind persons, persons using their mobile phone,...) With tables for design accessibiliy is not possible

    Foolow this link http://www.humanfactors.com/downloads/chocolateaud io.asp and listen what a blind person can ear when a website use unecessary tables.

    Moreover XHTML is more easily readable than XHTML for web-engine. With the separation of content and design you win lot's of bandwidth. Etc.

    All my websites now use XHTML and CSS and I am very happy with this. It work perfectly and I win so much time than bfore using tables. I can change the look of all my website by changing one file. Do this with table and without server languages (PHP,ASP,...).

    XHTML rox ! CSS rox ! HTML will die slowly :)