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?"
Re: (Score:1, Redundant)
Foolish. (Score:1, Troll)
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.
Re:Foolish. (Score:2, Informative)
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)
Daniel
You can't learn XHTML without HTML (Score:5, Insightful)
Re:You can't learn XHTML without HTML (Score:2, Insightful)
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.
Re:You can't learn XHTML without HTML (Score:5, Insightful)
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.
Re:You can't learn XHTML without HTML (Score:3, Interesting)
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.
Re:You can't learn XHTML without HTML (Score:2)
Re:You can't learn XHTML without HTML (Score:2)
Re:You can't learn XHTML without HTML (Score:3, Interesting)
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.
Good stuff here . . . (Score:5, Informative)
HTML is just used in a wrong way .. (Score:3, Informative)
The main differences between "correct" HTML and "correct" XHTML are:
* In XHTML closed tags should be ended with
.
* 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
Re:HTML is just used in a wrong way .. (Score:1)
From a good source, here's some real answers [nypl.org] as to the reasons behind XHTML.
Re:HTML is just used in a wrong way .. (Score:3, Insightful)
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
Re:HTML is just used in a wrong way .. (Score:3, Insightful)
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
Excellent idea! (Score:3, Funny)
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)
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
So teaching someone how to *design* a webpage using HTML is quite a redundant lesson.
Re:Excellent idea! (Score:2)
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)
- 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 anymoreHe 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.
Re:Excellent idea! (Score:2)
XHTML vs XML (Score:5, Insightful)
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.
Re:XHTML vs XML (Score:2)
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)
Use XHTML 2.0 (draft) today (Score:4, Interesting)
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
just reuse a good HTML4 tutorial (Score:3, Interesting)
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
Don't just teach XHTML, but put it in Context (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 [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.
XHTML is painful (Score:3)
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.
Re:XHTML is painful (Score:1)
text-align: center;
margin-left: auto;
margin-right: auto;
in the parent of the table you want to center