473,656 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XHTML or HTML 4.01?

Hi,

I converted most (not all) of my pages at http://johnbokma.com/ to
XHTML. I thought this was just a small change from 4.01.

However someone stated quite vaguely that my pages are *not* XHTML since
when a UA requests a page and states that it can handle XML the server
still responds with a Content-type: text/html

I see that http://www.w3.org/TR/xhtml1/ does the same (Firebird)

So is this wrong or not?

"XHTML Documents which follow the guidelines set forth in Appendix C,
"HTML Compatibility Guidelines" may be labeled with the Internet Media
Type "text/html""

Seems to suggest that nothing *is* wrong...

Related questions:

I have read somewhere (lost link) that this is rendered sometimes in
some UA's:

<?xml version="1.0" encoding="UTF-8"?>

Should I configure Apache to do this (if possible) and is this posible
with virtual hosting?

What is a recommended encodig for mixed English/Dutch text?
If I use Dutch on a mainly English page should I use

<span lang="nl" xml:lang="nl">N ederlands</span> Dutch ?

(assuming that nl means Dutch) or do I misunderstand the use of lang?

Many thanks in advance,
Regards,

John

--
email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

Jul 20 '05 #1
20 3288
John Bokma <po********@cas tleamber.com> wrote:
I converted most (not all) of my pages at http://johnbokma.com/ to
XHTML.
Wieso? Weshalb? Und vor allem: warum? Because "it's cool"?
I have read somewhere (lost link) that this is rendered sometimes in
some UA's:
<?xml version="1.0" encoding="UTF-8"?>
Should I configure Apache to do this (if possible) and is this posible
with virtual hosting?
See http://ppewww.ph.gla.ac.uk/~flavell/...ist.html#xhtml
What is a recommended encodig for mixed English/Dutch text?
ISO-8859-1
If I use Dutch on a mainly English page should I use
<span lang="nl" xml:lang="nl">N ederlands</span> Dutch ?
(assuming that nl means Dutch)
Yes.
or do I misunderstand the use of lang?


No.

--
Meanwhile at the Google Ranch ...
"I can't read this bloody site; it's all Falsh and JavaScrap."
"Forget it and move on! Still 2*718*281*828 pages to crawl."
Jul 20 '05 #2
Andreas Prilop wrote:
John Bokma <po********@cas tleamber.com> wrote:

I converted most (not all) of my pages at http://johnbokma.com/ to
XHTML.

Wieso? Weshalb? Und vor allem: warum? Because "it's cool"?


Nope. I rarely do something because "it's cool".

However, please explain why I should *not* convert to XHTML.
Should I configure Apache to do this (if possible) and is this posible
with virtual hosting?


See http://ppewww.ph.gla.ac.uk/~flavell/...ist.html#xhtml


Thanks, will read it.

[snip other answers]

Thanks!

Regards,
John

--
email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

Jul 20 '05 #3
John Bokma <po********@cas tleamber.com> wrote:
However, please explain why I should *not* convert to XHTML.


XHTML 1.0 is equivalent to HTML 4.01. You don't gain anything from
presenting web pages in XHTML 1.0. If you don't have any _real_
needs to use XHTML, it is pointless to convert _existing_ _valid_
HTML-4 documents to XHTML 1.0.

--
http://www.unics.uni-hannover.de/nhtcapri/plonk.txt
Jul 20 '05 #4
Alan J. Flavell wrote:
On Tue, Jul 29, John Bokma inscribed on the eternal scroll:

However someone stated quite vaguely that my pages are *not* XHTML since
They don't conform to XHTML/1.1 recommendations , is probably what the
message was trying to tell you.


Ah, well I state version="1.0" so that sounds a bit weird..
So is this wrong or not?

"XHTML Documents which follow the guidelines set forth in Appendix C,
"HTML Compatibility Guidelines" may be labeled with the Internet Media
Type "text/html""


Then they are XHTML/1.0 compatibility mode in that case.


<?xml version="1.0" encoding="UTF-8"?>, so yes, I think so.
Seems to suggest that nothing *is* wrong... Depends what DOCTYPE you are claiming.
XHTML 1.0 Strict (see http://johnbokma.com/ for full DOCTYPE)
I have read somewhere (lost link) that this is rendered sometimes in
some UA's:

<?xml version="1.0" encoding="UTF-8"?>


True.


Anyone has a link with the UA's that do this?
Should I configure Apache to do this (if possible)


Configure Apache to do what, exactly? Do you mean delivering
text/html to agents which don't indicate that XHTML is acceptable?
Or are you asking about some other feature of HTTP, maybe the
"charset" attribute?


The latter, sorry of my unclear question.
What is a recommended encodig for mixed English/Dutch text?


Strictly speaking, encoding and language are supposed to be
independent of each other in (X)HTML. In practice, different
choices may be preferable, depending on various considerations.

If you want to go for XHTML, then it might be advisable to leave off
the <?xml thingy and allow XML to take its default of utf-8. Then


The entire <?xml...> thingy or just the encoding part?
it can be more compatible with non-XML browsers. But if you want
non-XML compatibility _and_ follow W3C recommendations then you can't
go past XHTML/1.0, and it's not entirely clear why one would choose
XHTML/1.0 in preference to HTML/4.01, since the current crop of
browsers can do HTML/4.01 at least as well, if not better, than
XHTML/1.0.


Ok, I thougt to have some advantages due to the strictness and well
formedness of XHTML vs HTML/4.01. I will look into the XHTML > 1.0
documentation for problems I can run into with the current set up.
If I use Dutch on a mainly English page should I use

<span lang="nl" xml:lang="nl">N ederlands</span> Dutch ?


Put the language attribute(s) on whatever element is appropriate to
the context. If there is no such element, then indeed the <span...>
element can serve your purpose. Is my advice.


Ok, than I understand this one correctly. Thanks.

Regards,
John
--
email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

Jul 20 '05 #5
Andreas Prilop wrote:
XHTML 1.0 is equivalent to HTML 4.01. You don't gain anything from

John Bokma <po********@cas tleamber.com> wrote: I thought my gain was that there is a much stricter syntax. I consider
it as perl with the -w option and use strict; but I might be wrong here.


If you start with valid HTML, then it's easy to automate adding the useful
syntax strictness (closing tags, attribute quotes, etc.) that XHTML is
supposed to provide.

But current browsers don't support XHTML unless you pretend that it's
really HTML (by following Appendix C and sending it as text/html). And even
then, XHTML only works because browsers don't parse HTML properly. See
http://hixie.ch/advocacy/xhtml for more info on this.
--
Darin McGrew, da***@TheRallye Club.org, http://www.TheRallyeClub.org/
A gimmick car rallye is not a race, but a fun puzzle testing your
ability to follow instructions. Upcoming gimmick car rallye in
Silicon Valley: The Italian Rob (Saturday, August 2)
Jul 20 '05 #6
Darin McGrew wrote:
Andreas Prilop wrote:
XHTML 1.0 is equivalent to HTML 4.01. You don't gain anything from

John Bokma <po********@cas tleamber.com> wrote:
I thought my gain was that there is a much stricter syntax. I consider
it as perl with the -w option and use strict; but I might be wrong here.

If you start with valid HTML, then it's easy to automate adding the useful
syntax strictness (closing tags, attribute quotes, etc.) that XHTML is
supposed to provide.

But current browsers don't support XHTML unless you pretend that it's
really HTML (by following Appendix C and sending it as text/html). And even
then, XHTML only works because browsers don't parse HTML properly. See
http://hixie.ch/advocacy/xhtml for more info on this.


Thanks Darin, very clear. I consider going back to HTML/4.01. My XHTML
documents are correct but I don't want to:

"send back XHTML as application/xhtml+xml to UAs that support it, and as
text/html to legacy UAs."

since then I probably have to convince my host admin to change things
*if* possible with Apache.

And I don't expect IE to be a proper XML UA in the near (if ever) future...

Regards,
John
--
email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

Jul 20 '05 #7
Kris wrote:
In article <10************ ***@halkan.kabe lfoon.nl>,
John Bokma <po********@cas tleamber.com> wrote:

I have read somewhere (lost link) that this is rendered sometimes in
some UA's:

<?xml version="1.0" encoding="UTF-8"?>
True.


Anyone has a link with the UA's that do this?

Worse, IE4.x/Mac shows a blank page when encountering this. A fair
reason to leave it out.


Thanks Kris, enough reason for me to fall back to HTML/4.01 since I want
to support 4.x browsers as much as possible, and a blank page is bad.

John

--
email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

Jul 20 '05 #8
On Wed, Jul 30, John Bokma inscribed on the eternal scroll:
Then they are XHTML/1.0 compatibility mode in that case.
<?xml version="1.0" encoding="UTF-8"?>, so yes, I think so.


I think at this point you're confusing XML version 1.0 (which is what
the above says) and XHTML version 1.0 (which was what we were talking
about before).
XHTML 1.0 Strict (see http://johnbokma.com/ for full DOCTYPE)
OK then.
Should I configure Apache to do this (if possible)
.... Or are you asking about some other feature of HTTP, maybe the
"charset" attribute?


The latter, sorry of my unclear question.


My answer would be "yes", you should configure the server to put the
appropriate charset attribute onto the real HTTP Content-type header.

Note that this satisfies the relevant requirements of the Appendix C
compatibility appendix. You don't then have to mess with the <?xml...
thingy *and* <meta http=equiv... , as appendix C wants you to do in
the absence of an HTTP-protocol 'charset' attribute.
If you want to go for XHTML, then it might be advisable to leave off
the <?xml thingy and allow XML to take its default of utf-8.
I may have been over-cautious there. If you can set the real HTTP
header, then you can use the more traditional iso-8859-1 if you wish.
But note the other considerations explored in my checklist (Andreas
gave the URL already).
The entire <?xml...> thingy or just the encoding part?


The rule is that if the XML version is 1.0 (which it is), and the
coding can be determined by certain other rules (which you can check
for yourself when you're serious enough) then you may omit the whole
thing. The whole point was to avoid certain non-XHTML browsers from
displaying it as data, so I was showing how you may omit it entirely.
it can be more compatible with non-XML browsers. But if you want
non-XML compatibility _and_ follow W3C recommendations then you can't
go past XHTML/1.0, and it's not entirely clear why one would choose
XHTML/1.0 in preference to HTML/4.01, since the current crop of
browsers can do HTML/4.01 at least as well, if not better, than
XHTML/1.0.


Ok, I thougt to have some advantages due to the strictness and well
formedness of XHTML vs HTML/4.01.


That might be useful for _you_ in your various publishing processes,
but at the present state of play, once you send it out of your server
as text/html, it's going to get processed as tag-soup anyway, so I
don't see any benefit -in that sense- in sending XHTML out to the web.

Btw there's nothing stopping you from writing HTML more rigorously
than the rules of HTML actually require, if you wish. There's
software that will fill in the "optional" tags if you like (such as
HTMLtidy), or that will take XML-based markups and emit disciplined
HTML. There's lots of different ways, and without knowing more about
your internal process it's hard to say what's best for you internally.
All that I was trying to say - on this point - was that it seems a
waste of talent and effort to take existing content and re-work it
into XHTML - without a very clear motive as to why, because the web
out there won't care in the least, in fact the result rates to be
somewhat less compatible than what you started with.

For new material and XML-based authoring/publishing tools then the
balance starts to shift the other way, sure.
Jul 20 '05 #9
John Bokma <po********@cas tleamber.com> wrote:
XHTML 1.0 is equivalent to HTML 4.01. You don't gain anything from


I thought my gain was that there is a much stricter syntax.


It is stricter only in the sense that XHTML removes some of the
variation that is allowed in "classical" HTML (and by actual browsers),
such as using upper or lower case in tag names. Naturally you can apply
such restrictions even when authoring in HTML 4.01. Maybe you meant
that you want a validator to report violations of the restrictions?

Contrary to popular belief, XHTML 1.0 has both Strict and Transitional
version, just as HTML 4.01 has. So in terms of _logical_ strictness,
they're the same.

Actually, XHTML is _less_ strict in some respects in its formalized
syntax. For example, a validator will not report nested <a> elements as
syntax errors, since the formalized syntax does not prevent them, only
the prose. "Classical" HTML is in theory SGML based, which means a more
expressive metalanguage, which means that a validator will catch errors
like nesting <a> elements.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2085
by: Captain Nemo | last post by:
Hi I'm essentially a back-end programmer so I don't know very much about Dreamweaver. However, I work with web-designers who are keen for me to write my pages using Dreamweaver templates. One problem that has emerged straight away is that of XHTML compliance. I understand (and please correct me if I'm wrong) that in order to achieve this, every document must start with a line like:
3
1714
by: Spam Survivor | last post by:
Hi folks: I'm assuming someone's been down this path before: we want to provide our users with a tool integrated into our content-management website that will allow them to validate their html & xhtml documents. Our servers will be MS Win-2000. Plug-in commercial modules considered (something in .NET? COM+? Service exe?).
1
2128
by: Gordon - Adelphia | last post by:
I have a question regarding xhtml. Why, why, why does the ELEMENT <body> allow “unblocked” text. HTML does not (though, most browsers will render). Xhtml (transitional) however allows text nodes (PCDATA). All of HTML 4, xhtml – transitional, and xhtml-strict allow <div> to contain “unblocked” text. Does anybody know why – I’m looking for the philosophy behind allowing such. I’m in the process of encapsulating xhtml mark-up in content...
41
1248
by: CMAR | last post by:
What are the pluses and minuses of constructing and validating between XHTML Transitional vs. HTLM 4.01 Strict Thanks, CMA
15
2054
by: Jake Barnes | last post by:
I'm trying to learn AJAX so tonight I sat down and came up with a little toy that I can do tests with. You can see it here: http://www.publicdomainsoftware.org/ajaxExperiment.htm I've got Stuart Langridge's book "DHTML Utopia: Modern Web Design using Javascript and DOM" which seems pretty good. It covers the basics. The next thing I'd like to do is add a Save button to this little page I came up with. I may use Sam Stephenson's...
1
4373
by: Lore Leunoeg | last post by:
Hello Can I parse an XHTML Document with XPath? I tried the following expressions with the following XHTML Document with n o result: Removing the doctype and the namespace (xmlns) statemens I get the expected result . Problem: I need the doctype and the namespace tags in my document. Thank you
11
3096
by: Michael Powe | last post by:
How can I make an XHTML-compliant form of an expression in this format: document.write("<scr"+"ipt type='text/javascript' src='path/to/file.js'>"+"</scr"+"ipt>"); this turns out to be a non-trivial exercise. inserting '&lt;' and '&gt;' causes the browser to write the text to the page as literal text rather than as the intended script element. Using escape codes seemed to work (makes it standard compliant) but the text is not written to...
5
2565
by: sniper | last post by:
hi ; i have this small code that consist in taking the name of the user and writing it in the same form as an output.the name is relative to /data/valid/string1 In my Js code i want to access the value of /data/valid/string1 (The name seised by the user) and alert the name as result Can you help me to achieve this? <?xml version="1.0" encoding="UTF-8"?>
3
1764
by: Nik | last post by:
I have been trying base my site on the Ruthsarian Lab's layout at http://webhost.bridgew.edu/etribou/layouts/skidoo/demos/tweak_01.html This design is in xhtml, whereas I would prefer to have my pages in html4. In converting to html, some visual changes have crept in - any suggestions would be appreciated. My design in xhtml is at www.niksally.f2s.com/upload/xhtml.html
3
1752
by: dantohester | last post by:
Hi there, I have the following situation: I want to create an XML document that contains 2 parts: a) a XHTML part (it can be either version 1.0 or 1.1 ) b) a non XHTML part that contains some information about the first part - like the location of that content or some other info on different constituents of the first part The elements of the second part are defined by an XML schema.
0
8380
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8296
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8710
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.