Thanks for that, I get a big ugly error message
Something to play with now!
A very comprehensive FAQ. New technologies should be used for a reason, not simply because they are newer, or have an X prepended to their names.
Too many designers think using <br /> and setting an XHTML doctype has instantly set them apart as members of a modern webalati
Thanks for that FAQ!
Sounds like an icecream/coffee for Italian web developers.
The FAQ should mention that XHTML does not support the target attribute. From what I understand you have to resort to some kludgy JavaScript similar to the following:
<a onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;" href="abc">text</a>
Of course, JavaScript may be turned off. I donât use target very often but sometimes itâs useful. It would be great if there was a non-JS XHTML alternative but I havenât run into one yet.
Here I was thinking I knew a little something about xhtml/html/css and I read this. Iâm completely blown away ⌠I had no idea that xhtmlâs present benefits were few and far between.
To top that IE6 and EVEN IE7 will not support xhtml!!!
⌠i know nothing âŚ
Thanks for the great post!
XHTML âsupportsâ the target attribute equally much as HTML4. It is included in Transitional, but not in Strict. Oh, and using onkeypress here does nothing but hurting keyboard navigation.
If itâs in transitional but not strict and JS is the only alternative, my view is that the capability is deprecated with no alternative good alternative. Of course we may be in transitional (or even quirks mode) for a very long time so perhaps doing transitional is okay.
i love XHTML websites! im planning to study XHTML 2.0 but how can i start? i dunno if my current browser will support that technology!
- HTML (or XHTML) is for structure and semantics.
- CSS is for presentation.
- JavaScript is for interactive behaviour.
Opening a new window is behaviour.
You should only use a Transitional doctype during the transitional (gasp!) period when youâre converting an old tag-soup document into semantic markup. Itâs not meant to be used when creating new documents.
Itâs <pre-html4-doctype> â Transitional â Strict
or <nothing> â Strict
(At least thatâs how itâs meant to be.)
Awesome Tommy! Thanks for it
Thank you very much for such a useful and concise article!
We shouldnât forget also that XHTML provides a means of better standardising the way we code and therefore work, especially when working within a team of developers who might have gained a broad spectrum of HTML-based habits.
Since we as a team adopted XHTML, it has helped us communicate about coding techniques, QA code and look to develop useful templates for future use. little of this would have been possible if we had stuck with the almost formless HTML.
And how, exactly, is that? XHTML is not the same thing as web standards. You can â and should â be consistent when writing your markup, and separate structure from presentation and behaviour, regardless of whether you use HTML or XHTML. Especially since 99.99% of âXHTMLâ sites donât really use XHTML at all.
Iâm honestly curious. How does XHTML provide âa means of better standardising the way we codeâ, compared to HTML? Iâve looked deeply into the topic of XHTML vs HTML, and I have found no evidence of what youâre claiming, so Iâd appreciate very much if you could substantiate that claim and back it up with tangible evidence.
[size=-1]I must assume he was referring to well-formedness being easier to write.
I was under the assumition XHTML has five predefined entities: (<, >, &, ", and & apos; or did I misread the post.[/size]
Thanks for the explaination. I just migrated a mini-app to use window.open instead of target so itâs XHTML 1.0 Strict now. Iâm still not used to using JavaScript when itâs not technically required but the separation makes sense.
Well I have read and re-read these comments and posts, and can be considered a user of XHTML for no apparent reason other than lots of other people were. (and I like the green tick on FF that says I did at least something right today)
In my efforts to understand this better could we take the simplistic view that as long as validation is based on STRICT (HTML or XHTML) and that the choice of using HTML or XHTML is chosen based on your need (or lack) for say Javascript that you will be fine.
Especially as the apparent benefits of true XHTML documents for use on the WEB (I am ignoring extranet or intranet usage) appear to not exist as yet ?
Cheers
me, i believed that i could use any character entities
So xhtml is the new level of writing?
This was the point I was making in another thread: XHTML on a functional level may not provide a means of better standardising code, but I think it does on a conceptual level. XHTML has become the standard-bearer of web âŚum⌠standards. The emergence of XHTML, being a new variant of HTML, has forced people to look again at the way theyâve been doing things and realising that thereâs a rising movement of people doing things in a way they hadnât considered before.
Well, itâs not very clear, so itâs my fault if you misread it.
&lt;
, &gt;
, &amp;
and &quot;
are defined in both HTML and X(HT)ML. In addition, X(HT)ML defines &apos;
. What I was saying was that in HTML you can only use the first four, in XHTML you can use all five.
You canât rely on that in XHTML (served as XML). The character entities are defined in the DTD, but browsers use non-validating XML parsers that donât read the DTD. Gecko browsers have the list of entities hard-coded into the parser (IIRC), so it will work there. Others do not, and will only understand the five predefined entities.
When a document is served as text/html
, it is HTML, and HTML parsers have the list of entities hard-coded. Really old browsers donât support all entities, but the more common ones are widely supported.
I donât know what gave you that idea.
XHTML is not exactly ânewâ (the first specification came out in 2000). Itâs not on a different âlevelâ from HTML either. Itâs XML, which is different from HTML, but not necessarily better or worse except in certain details which Iâve tried to highlight in the first post.
So what youâre saying is that XHTML is better because lots of people say itâs better? There is lots of misinformation being used to promote XHTML: that itâs more strict and more semantic than HTML; that you cannot use CSS with HTML; that mobile phones require XHTML; that itâs more future-proof; that it renders faster, etc.
No! :mad: Please re-read the first post in this thread. XHTML is not a ânew variant of HTMLâ. It is an application of XML, which happens to have the same element semantics as HTML. This may seem to be hair-splitting, but the difference is fundamental and anyone who ventures into using XHTML should understand it.