Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: incrediBILL
So practically, what does this mean? From what I've learned so far it looks like the jump from transitional 4.0 to strict 4.0 is a much bigger jump than going from strict 4.0 to XHTML.
Would it make more sense to go straight to XHTML? Looks like it's just a matter of writing strict HTML 4 and adding on a small handful of extra rules. Things like closing every element, for instance -- writing <br></br> or <br /> instead of <br> seems a little odd, but it's no biggie. Well, maybe I'll need to update my editor first.
By the way, I found a very simple tutorial [w3schools.com]. I can use the W3C for looking things up, but I have a lot of trouble learning something new there.
So what is everyone doing, or planning to do? Strict XHTML requires CSS -- so external stylesheets seems to be the first order of business. From there, it seems a relatively simple jump to strict XHTML 1.0. Am I right?
I feel like I missed something. I was just going to make the leap from HTML to XML and use XSLT to make the web pages. I have had such bad luck with CSS stylesheets in the past that I really wanted a clean break.
Maybe I should look into XHTML. *shrug*
I do all my web pages using XHTML. It works great in virtually all browsers IF:
1) You make all tags lowercase
2) You enclose all attributes in double quote marks
3) Every tag must have a closing tag. Thus <input> must have </input>, <meta></meta>, etc. Particularly, <p> tags must have </p>. For a few HTML tags, there is no closing tag. For that use <br /> instead of <br>. The space before the / is required to keep all the current web browsers happy, although it is not required by XHTML specification.
4) A few attribute have no value. For example, multiple on a select tag. For those, you must use <... multiple="" ...>
5) Tags must nest properly. You cannot have <b><i>whatever</b></i> as the tags do not nest.
As long as you code to the HTML 3.2 spec, but use the above rules, virtually all browsers will be able to see and use the page.
I strongly recommend reading [w3.org...] for information on the what is different about XHTML. Particularly, read appendix C for how to make older browsers happy.
Edited by: Xoc
Before the <html> tag, you place one of these three lines to indicate which set of tags and attributes you are using. A validator will use that to verify the rest of the document.
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
I use transitional for everything, as there are a lot of browsers that can't do decent rendering if you use strict.
Edited by: Xoc
I should add to my comment above. The main problem with strict is that Netscape has so many bugs in its handling of CSS, that you practically can't use it. IE has less, but is also pretty apalling. The definitive list of CSS bugs can be found at [richinstyle.com...]
To see an example of pages coded in XHTML, see [w3.org...] (then view source) or look at my sites.
Does XHTML have to be programmed "by hand", or are there authorware softwares to do it for you?
I too am jumping on the XHTML bandwagon, very difficult to get my mindset away from years of preferentially coding in caps!
IE 5.0 supports XML, but applying any sort of styling is a problem. The XSLT support won't work with any standard-compliant XSLT sheet, and CSS is just ignored. I don't believe it has any XHTML support at all, either. It will, of course, render the backward compatible subset of XHTML if you tell IE it's not XML. 5.5 is better (it supports standard XSLT).
NS 6.0 and Mozilla support XML with CSS and mostly get XHTML right. XSLT isn't turned on by default (and won't be until Mozilla 0.9 and Netscape 6.5 PR1, which should be released about the same time).
In short, I recommend sticking to the nearly-HTML 4.0-compatible subset of XHTML 1.0 and using the MIME type text/html and file extension .html (since IE gets confused about MIME types). Things should get better a couple of years down the road.
Its like you are betting your career on who is going to win the race...and if you are wrong, you have to relearn everything...
What parts do you spend time learning and what parts can you "brush over"?
None of that, of course, changes that XHTML is what you should code to today.
Xoc, could you explain just a bit about the practical reasons for embedding data islands in an HTML page? I'm not sure how much I could get from a code example, until I understand the motivation for doing it.
The advantage of a data island is that it offloads data processing to the client. This reduces the load on the server, and can provide a more interactive experience. The main disadvantage of it is that it only works in IE. I don't recommend them for the Internet for that reason. But in places where you have a captive audience and can control the browser and browser version, such as B2B apps or intranet sites, they have some nice features. I'll provide an example as soon as I can work one up.
Seems it's mainly to adapt to a variety of future UA's and broaden the learning curve for xml and future versions of xhtml that might have more capability. Is this all?
BTW- Xoc, I'd be interested in the example you mentioned.
(edited for bad grammer)
Nothing seems to work right in NN6, because web designers weren't following standards (because previous browsers weren't either...). IE6 is causing some strange hiccups for the same reason.
Catch up to the up-and-coming standards on the new sites you're building now, and there won't be a need for a mad scramble to 'fix' anything when the browsers decide to get picky.
And XHTML isn't really an extra expense. Follow HTML4 standards strictly (proper tag nesting is important: <p><a></a></p> ), make sure all your <tags> are lower case, and make sure everything has a closing tag: <p></p> (stand alone tags need to carry their own closing: <br />).
AFAIK, those three steps will make any otherwise HTML4 page compliant with the basic requirements of XHTML.
Anyone got any other details to add?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<title>Data Island Example</title>
<xml id="xmlBooks" src="dataislanddata.xml"></xml>
<h1>Data Island Example</h1>
<td><input type="text" id="txtTitle" name="txtTitle" size="35" datasrc="#xmlBooks" datafld="title"></td>
<button onclick="xmlBooks.recordset.MoveFirst()" title="First Record" id="cmdFirst">Move First</button>
<button onclick="if (! xmlBooks.recordset.BOF) xmlBooks.recordset.MovePrevious()" title="Previous Record">Move Previous</button>
<button onclick="if (! xmlBooks.recordset.EOF) xmlBooks.recordset.MoveNext()" title="Next Record">Move Next</button>
<button onclick="xmlBooks.recordset.MoveLast()" title="Last Record">Move Last</button>
Save the second file as dataislanddata.xml in the same directory as the first file.
<title>Aboard the Galante</title>
<title>Absent Minded Professor, The</title>
<title>Augmented Agent, The</title>
<title>Bagful of Dreams, The</title>
<title>Blue World, The</title>
<title>Book of Dreams, The</title>
<title>Commander Tynnott's Insufferable Redheaded Daughter</title>
Open the first file in IE, and watch what happens.