Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

An XHTML Tutorial That Does Not Assume HTML? 39

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?"
This discussion has been archived. No new comments can be posted.

An XHTML Tutorial That Does Not Assume HTML?

Comments Filter:
  • Re: (Score:1, Redundant)

    Comment removed based on user account deletion
  • 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.

    • 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!
  • Ummm... (Score:2, Redundant)

    by KDan ( 90353 )
    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
  • by _vapor ( 55645 ) on Sunday March 02, 2003 @03:20PM (#5419658) Homepage
    I looked around for something like what you are looking for, and I found this [jessey.net]. 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.
    • 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.
  • by robbear7 ( 522771 ) on Sunday March 02, 2003 @03:24PM (#5419685) Homepage
    http://www.w3schools.com/xhtml/default.asp
  • by Khalidz0r ( 607171 ) on Sunday March 02, 2003 @03:25PM (#5419687) Journal
    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
    • 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 [nypl.org] as to the reasons behind XHTML.
      • 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
  • by 3-State Bit ( 225583 ) on Sunday March 02, 2003 @04:00PM (#5419883)
    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.

    • Re:Excellent idea! (Score:3, Insightful)

      by nkg ( 107712 )
      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.
      • 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.
    • Re:Excellent idea! (Score:2, Interesting)

      by Hanji ( 626246 )
      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.
  • XHTML vs XML (Score:5, Insightful)

    by ptaff ( 165113 ) on Sunday March 02, 2003 @04:17PM (#5419996) Homepage
    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.
    • 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.
  • Intro to XHTML (Score:4, Informative)

    by Miraz ( 654631 ) on Sunday March 02, 2003 @04:18PM (#5420003) Homepage
    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 [mactips.info]. This includes how to correctly structure information rather than just format it. Includes MP3 files and video. It's free.
  • by leighklotz ( 192300 ) on Sunday March 02, 2003 @07:05PM (#5420788) Homepage
    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 [w3future.com]

    The big missing pieces are XForms [w3.org], 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 [formsplayer.com] 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 [xml.com]
    .

    Here is an XMLHack article by Simon St. Laurent: http://www.xmlhack.com/read.php?item=1741 [xmlhack.com] 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.


  • by mike_sucks ( 55259 ) on Sunday March 02, 2003 @08:09PM (#5421110) Homepage
    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
  • by AShocka ( 97272 ) <reverse.gek@gmail.com> on Sunday March 02, 2003 @11:10PM (#5421795)

    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 [w3.org]; 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.

  • by SiMac ( 409541 ) on Sunday March 02, 2003 @11:27PM (#5421855) Homepage
    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.

"Ninety percent of baseball is half mental." -- Yogi Berra

Working...