Slashdot Mirror


An XHTML Tutorial That Does Not Assume HTML?

stevelinton writes "I am looking for a tutorial similar to Dave Ragget's excellent HTML tutorial(s), but for XHTML 1.1. I am NOT looking for a "HTML to XHTML" conversion tutorial. I want to teach a class XHTML 1.1 from day 1, without assuming that they know any HTML at all. Does anyone know of such a thing?"

39 comments

  1. whats so hard? by gyratedotorg · · Score: 1, Redundant
    I want to teach a class XHTML 1.1 from day 1, without assuming that they know any HTML at all.

    this should be extremely easy if you already know html. xhtml is almost exactly the same, but without all the text formating stuff that css takes care of. you can basically just teach html, but without mentioning anything that has a css equivilent. ;)

    --
    Gyrate Dot Org - "Where high-tech meets low-life"
    1. Re:whats so hard? by Anonymous Coward · · Score: 0

      some stupid mod seems to just have visited this thread, marking everything as Redundant?

      Some mods need to grow up a bit.

    2. Re:whats so hard? by Anonymous Coward · · Score: 0

      quit crying fucking bitch *SLAP*

  2. Foolish. by Profane+Motherfucker · · Score: 1, Troll

    Most people know how to walk before they get a bike. Most people know how to ride a bike before they drive a car. Most people know how to drive a car before they drive a semi truck.

    You want to teach a class that's in essence taking pants shitting crawling toddlers crawling, and teaching them to drive a double clutch tractor trailer.

    1. Re:Foolish. by $$$exy+Gwen+Stefani · · Score: 2, Informative

      Don't listen to the parent poster's advice please because he's dead wrong.

      You can easily teach XHTML without setting any course prerequisites such as HTML knowledge.

      XHTML is very intuitive and it's the cutting edge, really, these days. So go for it, I say.

      Get a couple good books as references, though; they'll serve as good workbooks from which you can glean sample problems and code for the students.

      Happy XHTML'ling!

      --

      31 people regularly point & click my G-spot
  3. Ummm... by KDan · · Score: 2, Redundant

    What's the problem, seriously? You know XHTML? Take any HTML tutorial and customize it to remove the non-XHTML-like bits. That's it. Bingo. XHTML is just "correct HTML". Just make sure you don't teach incorrect stuff, but the rest is identical.

    Daniel

    --
    Carpe Diem
  4. You can't learn XHTML without HTML by _vapor · · Score: 5, Insightful

    I looked around for something like what you are looking for, and I found this. As I see it, the problem with your request is that XHTML is not a "language" in itself. XHTML is essentially an XML-ized form of HTML. When you are writing XHTML, you are still using HTML tags (aside from the XHTML DTDs and such); the difference is that you are following XHTML rules (i.e. all tags must be lowercase, they must be well-formed, you must close all tags, etc). That is why, I think, it is hard to find an XHTML tutorial that doesn't presuppose that you already know the essentials of HTML. My advice to you is that if you are going to teach XHTML from step 1, presupposing no HTML knowledge, the best way would be to teach HTML but require the students to follow XHTML's rules.

    --
    www.poak.net
    1. Re:You can't learn XHTML without HTML by PeekabooCaribou · · Score: 2, Insightful

      I think the important thing about teaching XHTML is to avoid the mistakes of HTML. For example, if you're teaching XHTML, you don't want to spend a class teaching your students the ins and outs of table-based layout.

      XHTML and HTML look similar, but the mindset of XHTML is completely different. Any XHTML course would have to emphasize CSS just as strongly. We're working towards seperation of content and style here. HTML assumes you're going to use linebreaks for formatting, and transparent GIFs for spacing, and dozens of other tricks that make all your pages a headache to work with.

      --
      "I'll say it again for the logic-impaired." -- Larry Wall.
    2. Re:You can't learn XHTML without HTML by Anonymous Coward · · Score: 0
      HTML assumes you're going to use linebreaks for formatting, and transparent GIFs for spacing, and dozens of other tricks that make all your pages a headache to work with.

      I'm sorry, but this is an abuse of HTML. Read about HTML by the intelligentsia (e.g. Berners-Lee), and you'll see that all these 'tricks' that people use are abuses of HTML, not HTML itself. I learned HTML from a good book, and from the beginning used CSS and avoided all of those html hacks that lazy html users use. It was pretty trivial to switch to XHTML, since good HTML practice was not that far from XHTML.

    3. Re:You can't learn XHTML without HTML by lewp · · Score: 4, Insightful

      Perhaps IHBT, but oh well.

      Lazy HTML users? Most of the HTML hacks that "lazy" designers use are to get around browser incompatibilities so their clients' complex layouts look correct in all the browsers their customers might be using.

      You think people who design for a living wouldn't love to be able to just use CSS for everything and avoid nested tables and spacer gifs? Being able to run their page through the w3's validator and being positive it will work? Most of them are on cloud 9 that they can avoid font tags for the most part nowadays.

      Creating a simple page with CSS handling all the layout questions and having it just work everywhere is a dream that most designers want to realize. The current practice of creating a site and testing it in NN 4/6/7, IE 5(Win/Mac)/5.5/6, and perhaps Opera and Konq depending on the client's requirements, then adjusting for one browser's quirks and testing everything again is certainly not something designers enjoy. Unfortunately, the people who sign the checks don't so much care about clean HTML code as they do their pretty layout working in every browser they might use no matter how decrepit it is.

      --
      Game... blouses.
    4. Re:You can't learn XHTML without HTML by geekd · · Score: 2, Interesting

      True story from last week.

      Work conversation at the water cooler:

      Me: So what are you working on today?

      Coworker: I spent the last 6 hours making this page for [client] work correctly in Netscape 4.7

      Me: Who the heck still uses Netscape 4.7?

      Coworker: Apparently, [client] does.

      Happens all the time. Browsers never seem to come off the compatibility list, new ones just get added to it.

    5. Re:You can't learn XHTML without HTML by Anonymous Coward · · Score: 0

      I fucking hate NN4.7 just for that exact reason. I can develop layouts that look pristine in IE/Mozilla/NN6, but get totally fucked in NN4.

      If you are using NN4 (and have a fast enough machine), get the fuck out of the 90's.

      I've worked on a 300+ page site that ONE EDITOR used NN4 on, and he would bitch about it nonstop.

      That is all.

    6. Re:You can't learn XHTML without HTML by the+eric+conspiracy · · Score: 2, Interesting

      Unfortunately, the people who sign the checks don't so much care about clean HTML code as they do their pretty layout working in every browser they might use no matter how decrepit it is.

      Nowadays I am finding a lot of clients who react positively to a discussion of how writing HTML 4.01 strict code saves them both development and maintence dollars.

      That 2-3% of people using Netscape 4.0 etc. costs the client a lot of money to support.

    7. Re:You can't learn XHTML without HTML by spinkham · · Score: 1

      opera (and some gecko based browsers) is faster by far then NN4 anyway.. So there's not even the "My computer's to slow" argument to stand on...

      --
      Blessed are the pessimists, for they have made backups.
    8. Re:You can't learn XHTML without HTML by 0x20 · · Score: 1

      It's not about that. If you develop, say, an intranet site for a client with an installed base of a few thousand or more Pentium II machines (or thin clients or whatever; they're a lot more common than you think) they're not going to and they shouldn't have to upgrade or change their application set to meet the demands of your HTML.

    9. Re:You can't learn XHTML without HTML by Anonymous Coward · · Score: 0

      Many people who use SGI still use Netscape 4.7 because while there are other browsers available they have problems with Flash and the like
      N

  5. Good stuff here . . . by robbear7 · · Score: 5, Informative

    http://www.w3schools.com/xhtml/default.asp

  6. HTML is just used in a wrong way .. by Khalidz0r · · Score: 2, Informative

    Well, most of XHTML is exactly like HTML, HTML is only badly used, and most people looking for writing correct HTML tend to use XHTML because it sounds more correct.

    The main differences between "correct" HTML and "correct" XHTML are:

    * In XHTML closed tags should be ended with /> instead of >, example would be
    .

    * Proper nesting is very important in XHTML, you cannot do something like x .

    * Some few attributes are removed, and some are added.

    In *both* HTML and XHTML, use of CSS for layout is stressed. In both most good practices are advised. So HTML tutorials should serve as good introduction to XHTML.

    In my personal opinion, I think teaching XHTML without introducing HTML first is a bit wrong, because HTML is still the most used recommendation, and usage of HTML did not die yet, and some people even argue that it is too early to start using XHTML in real practice.

    Anyway, answering your question, I got this old XHTML related book, which I like and would advise people to use. "XHTML In plain English", it serves as both an XHTML and CSS reference and has good introduction to both. it seems however that their page is not active anymore, if you like to visit it anyway, it is http://mandtbooks.com/.

    My verdict is, it is _better_ to teach HTML before talking about XHTML, XHTML is just HTML based on XML rules, nothing much different than normal HTML.

    Thanks for reading,

    Khalid

    --
    "What you 'seek' is what you get!"
    1. Re:HTML is just used in a wrong way .. by Profane+Motherfucker · · Score: 1

      I call bullshit on this. The reason to use XHTML isn't because some standards nazi masturbates to good code. It's because XHTML provides long-term durability and significant portability as the world transitions to XML, and as non-desktop browsers, like phones and PDAs become more and more popular as browsing devices.

      From a good source, here's some real answers as to the reasons behind XHTML.

    2. Re:HTML is just used in a wrong way .. by Khalidz0r · · Score: 2, Insightful

      Well,

      XHTML provides long term durability because of its strict rules, WHICH ALSO apply to HTML,

      XHTML used nowadays still doesn't depend on real XML, it is still only based on the rules,

      Stuff you are talking about is still to come in the future, NOT now.

      People use XHTML and send it as text/html still, this is enough reason to show that it is wrong. Most browsers do NOT interpret XHTML based on XML yet.

      XHTML time will come, but still the "rules" of using it are the same as those of HTML so far, with few differences as I mentioned earlier, it is better to learn HTML and then see how XHTML comes out of it rather than start out with HTML.

      Khalid

      --
      "What you 'seek' is what you get!"
    3. Re:HTML is just used in a wrong way .. by Anonymous Coward · · Score: 0

      Do you mean most browsers like Mozilla and IE. My XHTML pages display fine in both, and that's about all I care about since they're the only two that have halfway decent XML support.

    4. Re:HTML is just used in a wrong way .. by Khalidz0r · · Score: 2, Insightful

      You write XHTML code, but you don't use XSLT, but a normal dtd.

      This is just using the XML convention, NOT actually using XML yet, there are some websites in the internet using fully XML based XHTML which you hardly can view with any browser, I forgot the name though.

      P.S. I code XHTML myself when I develop pages, I have nothing against XHTML, but I think it's better to learn HTML before and then understand how XHTML is different, gives us more knowledge.

      Khalid

      --
      "What you 'seek' is what you get!"
    5. Re:HTML is just used in a wrong way .. by Anonymous Coward · · Score: 0

      Redundant?? What the heck!

  7. Excellent idea! by 3-State+Bit · · Score: 2, Funny
    XHTML is a set of tags that make use of most HTML tags, and yet wouldn't it be awesome not to have those HTML tags to begin with? It would save half the work.

    Likewise, does anyone know of a:

    C++ tutorial that does not teach any C keywords?

    Linux administration course that does not teach any Unix concepts?

    etc...
    Basically my point is, if it doesn't exist, it's because it shouldn't exist -- because if shoulds were woulds, we'd have a forest -- and we do, several big ones, mostly in the tropics, Q.E.D.

    So, yeah.

    1. Re:Excellent idea! by nkg · · Score: 3, Insightful

      I think you are missing the point.
      HTML, XHTML mark-up are very similar and someone with a good grasp of HTML would be able to pick up the differences very quickly.
      Yes they both are mark-up languages used to create/display web page But how you go about creating web pages with the two are very different. Presently (most not all) html designers would use Dreamweaver to design a web page using table's for poisonings. font tag's to change size,face & colour. etc.

      Whilst those who prefer XHTML mark-up try and put the layout elements in to CSS.
      So how you go about creating /designing the pages are quite different.
      So teaching someone how to *design* a webpage using HTML is quite a redundant lesson.

    2. Re:Excellent idea! by Hanji · · Score: 2, Interesting
      Likewise, does anyone know of a:
      • C++ tutorial that does not teach any C keywords?
      • Linux administration course that does not teach any Unix concepts?
      • etc...
      No, I don't know of any such courses, but that's irrelevant, because using C keywords in a C++ course is utterly different from teaching straight C, and then saying "OK, now for C++: this is new, you can't do this anymore ..."
      He doesn't want an XHTML course that doesn't use the HTML tags at all - that's impossible. He just wants a course that STARTS right out with XHTML, and that doesn't teach HTML, and then expect the students to alter what they've learned to use XHTML.

      I actually suspect this post is a joke, but because it was modded up as interesting, I feel compelled to repy.
      --
      A Minesweeper clone that doesn't suck
    3. Re:Excellent idea! by Anonymous Coward · · Score: 0

      >if I put a perl virus here...
      I'd run it, just because I'd be so impressed. I mean, I know that one-liners can do everything, but a full-fledged virus?

    4. Re:Excellent idea! by moonbender · · Score: 1

      Considering that posting that signature to Slashdot already takes care of the proliferation, everything left to do for the perl code would be the payload ... ;) (Love the sig, incidently!)

      --
      Switch back to Slashdot's D1 system.
    5. Re:Excellent idea! by spinkham · · Score: 1

      I disagree.
      For most pages, HTML 4.01 and XHTML 1.x are basically the same. Both should depend on style sheets, or can use old layout hacks.
      All it takes to convert an HTML 4.01 Strict profile page to XHTML 1 is to add a few "/" characters in the closeing of tage that aren't otherwise closed.
      The difference between HTML 3.x and HTML 4.X or XHTML 1.x are large. The differences between the newest iterations of XHTML and HTML are small.

      --
      Blessed are the pessimists, for they have made backups.
  8. XHTML vs XML by ptaff · · Score: 5, Insightful

    First of all, something _very_ important is to make sure your students understand the 'tree-like' organisation of information in XML. h1 and p tags are NOT designed to be tags for bigger size and line breaks. People tend to look HTML as a paint program, it's so easy and Internet Explorer allows all this stuff.

    Then you can show them HTML tags. I think the road from HTML to XHTML is much more dangerous than beginning with XML because of all the bells and whistles that can distract from the fact that XHTML is a _structure oriented_ markup language.

    As some of your students will already know some HTML, don't let them corrupt their classmates with "witty" tricks like spacers made out of GIFs and FONT all over the place.

    May I suggest Mozilla as a workbench? it can be configured to be extremely strict regarding XML syntax, and if it does fine in Mozilla, you are SURE it's legal.

    1. Re:XHTML vs XML by self+assembled+struc · · Score: 1

      spacers made out of gifs are completely valid form of XHTML syntax, as long as you're closing your img tag with the /> "empty" tag ending.

      now, structurally, no you shouldn't use them, but even strict rendering in mozilla will render those correctly and not throw an exception.

      you are right in saying that they shouldn't be used, that's why we have css and preciese lay-out in pixel-widths and the such. but GIF spacers are 100% valid XHTML 1.0.

  9. Intro to XHTML by Miraz · · Score: 4, Informative

    No problem at all to start people off on XHTML instead of HTML. For an entry level, beginner's course which teaches correct, valid, accessible XHTML which will then link to a CSS stylesheet look at my Intro to XHTML. This includes how to correctly structure information rather than just format it. Includes MP3 files and video. It's free.

  10. Use XHTML 2.0 (draft) today by leighklotz · · Score: 3, Interesting
    If you're interested in XHTML and XML, take a look at XHTML 2.0.
    XHTML moves the presentation out into CSS completely, and so can be presented by an XML+CSS rendering engine; what's left in XHTML 2.0 is the semantics.

    It's possible to use most of XHTML 2.0 in today's modern browsers, though crafting the style sheets to make it work is a job for serious experts. Here is a sample weblog page converted to XHTML 2.0 and it should display properly in most modern browsers: http://w3future.com/weblog/gems/xhtml2.xml

    The big missing pieces are XForms, which abstracts the form data model and operations out of XHTML into its own module, and XML Events, which does the same for events (though it is compatible with recent DOM events). There is aplugin for Internet Explorer that make XForms work seamlessly inside XHTML documents, so I suspect that if you are so inclined, in a month or two you can be targeting to the draft of XHTML 2.0 with support for most of its features, and get cross-browser standards-based support for the same kinds of features you're writing back-end ASP hacks and browser-specific JavaScript and ActiveX controls for today. (No, it won't work in IE 4.0 or Netscape 4.62, but neither will most of the hacks and ActiveX controls.)

    Here is an article on XHTML 2.0: http://www.xml.com/pub/a/2002/08/07/deviant.html
    .

    Here is an XMLHack article by Simon St. Laurent: http://www.xmlhack.com/read.php?item=1741 who writes

    The new XHTML 2.0 introduces XForms integration, navigation lists, linking on every element, unordered section headings, and an expanded role for the object element.


  11. just reuse a good HTML4 tutorial by mike_sucks · · Score: 2, Interesting

    Since XHTML 1.x is just a reformulation of HTML4 as XML, all you need to do is find/devise a good HTML course, and add in the XML/XHTML specific bits such has closing empty tags, well-formedness, etc, etc. It shouldn't bee too hard.

    Of course, the other comments posted about the importance of using the correct semantics, the separation of style and content, etc, etc must also be taken into account, but that is true for HTML as well. A good HTML course will focus on that anyway.

    You shouldn't need radically different HTML4/XHTML1 courses.

    /mike

    --
    -- "So, what's the deal with Auntie Gerschwitz et all?"
  12. Don't just teach XHTML, but put it in Context by AShocka · · Score: 3, Informative

    There are some good references here already, but you need to do more than just teach pure xhtml, you should give some history and context, and reasons why xhtml exists. Cover both the benefits, limitations and user agent support. It's important to put whatever you are teaching in context, not just teach it devoid of real life application and history.

    Explain xhtml in terms of the main xhtml DOCTYPES/DTDs; strict, transitional and frameset. Without understanding DOCTYPEs the context of markup can be lost. Focus on strict dtd, but be sure to cover it's dangers and limitations in user agents. Getting students to work with strict will give them a better understanding of the whole process of trying to separate content from presentation, develop real knowledge and skills and understanding the benefits of this in the long run. If students use strict they will need to reject all use of deprecated tags, which is a good discipline to get into.

    Learning xhtml is not as tough as learning good accompanying CSS practice, especially if you are trying to manage positioning in the design, and also design according to accessibility principles using relative units instead of absolute units.

    You should also cover relevant material in W3C documents

    Also briefly address xhtml2 (xforms etc), XML and XSL/XSLT.

  13. XHTML is painful by SiMac · · Score: 2

    Really. Check http://www.simonster.com/index.thtml. It's fully XHTML 1.1 compliant. Unfortunately, there are a few consequences of this. First of all, You can't center a fixed width table. Well, you can, by using left-margin: auto; right-margin: auto; but it doesn't work in any Windows version of IE even though it has been in the CSS standard for a very long time! (It works fine in IE 5 for Mac, Konqueror, Safari, and Mozilla).

    XHTML isn't a good idea for teaching a course. Most people don't give a fuck whether your design is technically sound as long as it works right. XHTML 1.0 Transitional might be reasonable, since it supports enough of the old HTML tags to allow browser compatibility, but XHTML 1.1 needs to wait a few years.

    1. Re:XHTML is painful by Machuidel · · Score: 1

      Hack it using:

      text-align: center; /* IE hack */
      margin-left: auto;
      margin-right: auto;

      in the parent of the table you want to center ;)

      --
      Mike Machuidel