By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,532 Members | 1,514 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,532 IT Pros & Developers. It's quick & easy.

HTML and XHTML

P: n/a

Hello,

What is the difference between HTML and XHTML...

Thanks,
------------------------------------------------------------------------
IT Interview Questions : http://www.geekinterview.comIT Tutorials and Articles : http://www.geekarticles.com
Oct 11 '05 #1
Share this Question
Share on Google+
32 Replies


P: n/a
In article <Co***************@talk.geekinterview.com>,
Cornel Bicutzi <> wrote:
What is the difference between HTML and XHTML...
Slashes in odd places for XHTML. A different DTD. Don't use capitals for
XHTML elements and attributes. XHTML is funky in some browsers. That's
it. Well written HTML converts to XHTML seamlessly by following good
HTML practice in Tidy.
Now, what is XHTML good for, folks?
Thanks,


You're welcome.

leo

--
<http://web0.greatbasin.net/~leo/>
Oct 12 '05 #2

P: n/a
Cornel Bicutzi <> wrote in
news:Co***************@talk.geekinterview.com:

Hello,

What is the difference between HTML and XHTML...


X

Sorry, couldn't resist. :)
--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
Oct 12 '05 #3

P: n/a
On 11 Oct 2005 19:20:00 -0700, Stan McCann <me@stanmccann.us> wrote:
Cornel Bicutzi <> wrote in
news:Co***************@talk.geekinterview.com:

Hello,

What is the difference between HTML and XHTML...
X


Pronounced "ten."
Sorry, couldn't resist. :)


Me either ;-)

Nick

--
Nick Theodorakis
ni**************@hotmail.com
contact form:
http://theodorakis.net/contact.html
Oct 12 '05 #4

P: n/a
> Hello,

What is the difference between HTML and XHTML...

google "difference between HTML and XHTML"
....

http://google.com/search?&q="difference+between+HTML+and+XHTML"

....
this gets some good info.

--
movies in WA : http://www.grandcinemas.com.au
beef jerky - good to chew : http://www.choicebeefjerky.com.au
eat beef jerky
Oct 12 '05 #5

P: n/a
Cornel Bicutzi wrote:

What is the difference between HTML and XHTML...

Visit <http://www.w3.org/>. Everything you wanted to know about HTML
and XHTML.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Oct 12 '05 #6

P: n/a
In our last episode, Cornel Bicutzi pronounced to
comp.infosystems.www.authoring.html:
What is the difference between HTML and XHTML...


http://www.w3.org/TR/xhtml1/#diffs

--
Mark Parnell
http://clarkecomputers.com.au
Oct 12 '05 #7

P: n/a
On Tue, 11 Oct 2005, Leonard Blaisdell wrote:
Cornel Bicutzi <> wrote:
| From: Cornel Bicutzi <>
You're welcome.


Not with such an illegal From address.

Oct 12 '05 #8

P: n/a
On Wed, 12 Oct 2005 16:35:19 +1000, in
comp.infosystems.www.authoring.html , Mark Parnell
<we*******@clarkecomputers.com.au> in
<43***********************@per-qv1-newsreader-01.iinet.net.au> wrote:
In our last episode, Cornel Bicutzi pronounced to
comp.infosystems.www.authoring.html:
What is the difference between HTML and XHTML...


http://www.w3.org/TR/xhtml1/#diffs


Which is some good detail. ISTM that XHTML is the more formal, more
structurally coherent and more structurally (not semantically)
restricted system. Shouldn't this make a XHTML compliant paper less
prone to error, easier to provide a consistent rendering?

--
Matt Silberstein

Do something today about the Darfur Genocide

Genocide is news | Be A Witness
http://www.beawitness.org

"Darfur: A Genocide We can Stop"
www.darfurgenocide.org

Save Darfur.org :: Violence and Suffering in Sudan's Darfur Region
http://www.savedarfur.org/
Oct 12 '05 #9

P: n/a
On Wed, 12 Oct 2005 15:00:45 GMT, Matt Silberstein
<Re**************************@ix.netcom.com> wrote:
ISTM that XHTML is the more formal, more
structurally coherent and more structurally (not semantically)
restricted system.


XHTML 1.0 is purposely no more restricted in any way than HTML 4.01, it
merely uses a different framework in which to express its restrictions.
(barring a few entirely trivial incompatibilities between XML and SGML
as used by HTML).

If XHTML appears different to HTML, this is because of the impositions
of XML, not some new constraint that XHTML 1.0 has added. In many cases
the difference isn't even that big. HTML must have all elements closed,
just as XHTML must. The difference is that SGML allows elements to be
closed by inference from the DTD and the appearance of some other
element that couldn't be contained inside the current element (implying
necessary closure) - XML however doesn't have this ability and so all
elements must be closed explicitly in the document source. Equally HTML
must have its attribute values quoted - unless they're in the small set
of values that are unambiguously distinct from markup, even if unquoted.

HTML 4.01 and XHTML 1.0 express the same underlying document, they
merely vary in some minor syntactical issues.
Oct 12 '05 #10

P: n/a
Andy Dingley wrote:

HTML must have all elements closed, just as XHTML must.


The HTML 4.01 spec shows 15 end tags that are optional, of which 4 start
tags are also optional.
http://www.w3.org/TR/html4/index/elements.html

--
Gus
Oct 13 '05 #11

P: n/a
In our last episode, Gus Richter <gu********@netscape.net> pronounced to
comp.infosystems.www.authoring.html:
Andy Dingley wrote:

HTML must have all elements closed, just as XHTML must.


The HTML 4.01 spec shows 15 end tags that are optional, of which 4 start
tags are also optional.


Which is why Andy went on to clarify:
The difference is that SGML allows elements to be
closed by inference from the DTD and the appearance of some other
element that couldn't be contained inside the current element (implying
necessary closure)


IOW, all elements have to be closed in both HTML and XHTML, but HTML is
capable of closing some of them automatically, whereas XHTML has to be
specifically told to close them.

--
Mark Parnell
http://clarkecomputers.com.au
Oct 13 '05 #12

P: n/a
Mark Parnell wrote:
In our last episode, Gus Richter <gu********@netscape.net> pronounced to
comp.infosystems.www.authoring.html:
Andy Dingley wrote:
HTML must have all elements closed, just as XHTML must.


The HTML 4.01 spec shows 15 end tags that are optional, of which 4 start
tags are also optional.

Which is why Andy went on to clarify:

The difference is that SGML allows elements to be
closed by inference from the DTD and the appearance of some other
element that couldn't be contained inside the current element (implying
necessary closure)

IOW, all elements have to be closed in both HTML and XHTML, but HTML is
capable of closing some of them automatically, whereas XHTML has to be
specifically told to close them.


Thank you for that, but as I understand the question, it is regarding
document creation in using HTML vs. XHTML and not how the browser is to
parse optional tags within an HTML document, or where/how am I missing
the relevance?

--
Gus
Oct 13 '05 #13

P: n/a
In our last episode, Gus Richter <gu********@netscape.net> pronounced to
comp.infosystems.www.authoring.html:
Thank you for that, but as I understand the question, it is regarding
document creation in using HTML vs. XHTML and not how the browser is to
parse optional tags within an HTML document, or where/how am I missing
the relevance?


The OP simply asked what the difference between HTML and XHTML was. The
context wasn't specified. Matt's question, which Andy was responding to,
seems to me to be concerned with the way browsers handle the languages,
rather than authoring.

Either way, Andy's statement was correct, regardless of whether it
answered the question. :-)

--
Mark Parnell
http://clarkecomputers.com.au
Oct 13 '05 #14

P: n/a

Gus Richter wrote:
Andy Dingley wrote:

HTML must have all elements closed, just as XHTML must.


The HTML 4.01 spec shows 15 end tags that are optional, of which 4 start
tags are also optional.


Thankyou for playing straight man to the obvious question 8-)

In well-formed XML, an element is equivalent to either a pair of tags
(start and end tags) or a single tag (empty-element tag). In SGML as
used by HTML (which is slightly simplified from SGML in general) the
situation is different - there are no empty-element tags and a HTML
element can be delimited by either a pair of start and end tags (like
XML), or by a start tag and implicit closure indicated by context and
the DTD (unlike XML). For elements defined as empty (e.g. <br>) this
happens immediately after the start tag, for other elements it depends
on what follows - a <p> might be closed by the start of another <p>, or
it might even not be closed until the end of the HTML document.

However, and this is rarely grasped by HTML authors, the HTML
"elements" _are_ closed just where their XHTML equivalent would be
closed, even if there's no end tag. The "element" is an item at the
level of the DOM or the Infoset, not just a lexical item like a tag.
That's the _real_ difference between SGML tags and elements, not just a
simple "two tags make an element".

Oct 13 '05 #15

P: n/a
Mark Parnell said the following on 10/12/2005 08:35 +0200:
In our last episode, Cornel Bicutzi pronounced to
comp.infosystems.www.authoring.html:
What is the difference between HTML and XHTML...


http://www.w3.org/TR/xhtml1/#diffs


I can't understand why in XHTML exclusions are not possible (chapter 4.9. of the above specified URL):

http://www.w3.org/TR/xhtml1/#h-4.9

The XHTML DTD seems to be SGML, just like the HTML DTD, is this correct? If so, then I see no reason why the XHTML DTD can't use exlusions.

The XHTML DTD seems to be excluding "a" elements by declaring an entity "a.content" which does not include "a" elements:

<!-- a elements use %Inline; excluding a -->
<!ENTITY % a.content
"(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; |
%misc.inline;)*">
<!ELEMENT a %a.content;>

When I validate an xhtml document with nested <a ..> elements, it fails (it's not valid).

Maybe the XHTML DTD doesn't use exclusion like the HTML DTD does;

<!ELEMENT A - - (%inline;)* -(A) -- anchor -->

but the effect seems to be the same.

Therefor, I'm having trouble with wat is said in 4.9 SGML exclusions.

--
Regards
Harrie
Oct 13 '05 #16

P: n/a
Andy Dingley wrote:
Gus Richter wrote:
Andy Dingley wrote:
HTML must have all elements closed, just as XHTML must.


The HTML 4.01 spec shows 15 end tags that are optional, of which 4 start
tags are also optional.

Thankyou for playing straight man to the obvious question 8-)

In well-formed XML, an element is equivalent to either a pair of tags
(start and end tags) or a single tag (empty-element tag). In SGML as
used by HTML (which is slightly simplified from SGML in general) the
situation is different - there are no empty-element tags and a HTML
element can be delimited by either a pair of start and end tags (like
XML), or by a start tag and implicit closure indicated by context and
the DTD (unlike XML). For elements defined as empty (e.g. <br>) this
happens immediately after the start tag, for other elements it depends
on what follows - a <p> might be closed by the start of another <p>, or
it might even not be closed until the end of the HTML document.

However, and this is rarely grasped by HTML authors, the HTML
"elements" _are_ closed just where their XHTML equivalent would be
closed, even if there's no end tag. The "element" is an item at the
level of the DOM or the Infoset, not just a lexical item like a tag.
That's the _real_ difference between SGML tags and elements, not just a
simple "two tags make an element".


I'm not negating your points at all. I think that your points are well
made and are good to know. I do, however, think that in the context of
this discussion, a new author may be mislead or confused regarding the
differences between HTML and XHTML by the statement:

"HTML must have all elements closed, just as XHTML must."

The established rules for HTML clearly state that there are optional
opening/closing tags and empty elements which must not have a closing
tag. XHTML on the other hand dictates that there are no optional tags
and that all elements must be closed.

When attending a play, one goes for the performance and not for what
goes on behind the scenes, nor for the historical behind the scene
changes. Likewise, an author creates a document according to the
established rules as set out and should not have to consider behind the
scene browser parsing methods, nor historical reasons for such rules.

How it is parsed and historical linkage is good information, but not
requisite knowledge to authoring to HTML or XHTML. In the context of the
question by the OP, as I read it, I believe the statement to be
misleading and subsequent information probably only obfuscates the issue
at that level.

--
Gus
Oct 13 '05 #17

P: n/a
Harrie wrote:
I can't understand why in XHTML exclusions are not possible (chapter
4.9. of the above specified URL):

http://www.w3.org/TR/xhtml1/#h-4.9

The XHTML DTD seems to be SGML, just like the HTML DTD, is this correct?
It's an XML DTD. It's similar to an SGML DTD, but not quite the same.
Maybe the XHTML DTD doesn't use exclusion like the HTML DTD does;

<!ELEMENT A - - (%inline;)* -(A) -- anchor -->

but the effect seems to be the same.


Thy this in both HTML and XHTML.

<a><span><a>test</a></span></a>

HTML will fail validation, because the -(A) excludes the a element as
being any descendant of another a element, whereas the XHTML will pass
because the DTD only prevents child a elements.

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Oct 13 '05 #18

P: n/a
Lachlan Hunt said the following on 10/13/2005 19:24 +0200:
Harrie wrote:
The XHTML DTD seems to be SGML, just like the HTML DTD, is this correct?
It's an XML DTD. It's similar to an SGML DTD, but not quite the same.


It doesn't begin with an xml prologue, or am I too narrow minded? Can you give me some pointers where an XML DTD is explained?
Thy this in both HTML and XHTML.

<a><span><a>test</a></span></a>

HTML will fail validation, because the -(A) excludes the a element as
being any descendant of another a element, whereas the XHTML will pass
because the DTD only prevents child a elements.


Hmmm, so it does, interesting. Thanks for the explanation.

--
Regards
Harrie
Oct 13 '05 #19

P: n/a
Harrie <sp*****@linux.org.invalid> wrote:
Lachlan Hunt said the following on 10/13/2005 19:24 +0200:
It's an XML DTD. It's similar to an SGML DTD, but not quite the
same.


It doesn't begin with an xml prologue, or am I too narrow minded?


Pardon? A DTD is *part* of the prolog -- it's an optional part of the
document type declaration which itself is an optional part of the
prolog.
Can you give me some pointers where an XML DTD is explained?


The XML spec would be a good guess, I guess.
<http://www.w3.org/TR/REC-xml/#elemdecls>
<http://www.w3.org/TR/REC-xml/#sec-entity-decl>

(note that XML markup declarations have just some restrictions compared
to SGML, so you might be able to look at an arbitrary external DTD
entity and possibly determine 'this cannot be an XML DTD', but you
cannot conclude 'this *is* an XML DTD')
--
Goodbye and keep cold
Oct 13 '05 #20

P: n/a
On Thu, 13 Oct 2005 11:58:26 +1000, in
comp.infosystems.www.authoring.html , Mark Parnell
<we*******@clarkecomputers.com.au> in
<43***********************@per-qv1-newsreader-01.iinet.net.au> wrote:
In our last episode, Gus Richter <gu********@netscape.net> pronounced to
comp.infosystems.www.authoring.html:
Andy Dingley wrote:

HTML must have all elements closed, just as XHTML must.


The HTML 4.01 spec shows 15 end tags that are optional, of which 4 start
tags are also optional.


Which is why Andy went on to clarify:
The difference is that SGML allows elements to be
closed by inference from the DTD and the appearance of some other
element that couldn't be contained inside the current element (implying
necessary closure)


IOW, all elements have to be closed in both HTML and XHTML, but HTML is
capable of closing some of them automatically, whereas XHTML has to be
specifically told to close them.


From my POV as a developer, if I don't have to do it, then it does not
matter. It something is done implicitly then I don't necessarily know
when it is done. So the XHTML is more restrictive *on me*.

--
Matt Silberstein

Do something today about the Darfur Genocide

Genocide is news | Be A Witness
http://www.beawitness.org

"Darfur: A Genocide We can Stop"
www.darfurgenocide.org

Save Darfur.org :: Violence and Suffering in Sudan's Darfur Region
http://www.savedarfur.org/
Oct 13 '05 #21

P: n/a
On Thu, 13 Oct 2005 14:17:49 +1000, in
comp.infosystems.www.authoring.html , Mark Parnell
<we*******@clarkecomputers.com.au> in
<43***********************@per-qv1-newsreader-01.iinet.net.au> wrote:
In our last episode, Gus Richter <gu********@netscape.net> pronounced to
comp.infosystems.www.authoring.html:
Thank you for that, but as I understand the question, it is regarding
document creation in using HTML vs. XHTML and not how the browser is to
parse optional tags within an HTML document, or where/how am I missing
the relevance?
The OP simply asked what the difference between HTML and XHTML was. The
context wasn't specified. Matt's question, which Andy was responding to,
seems to me to be concerned with the way browsers handle the languages,
rather than authoring.


I had meant as an author, sorry for the confusion. Why would I care
about browsers? That is almost like caring about users. ;-)
Either way, Andy's statement was correct, regardless of whether it
answered the question. :-)


And that is all that really matters, isn't it? ;-)
--
Matt Silberstein

Do something today about the Darfur Genocide

Genocide is news | Be A Witness
http://www.beawitness.org

"Darfur: A Genocide We can Stop"
www.darfurgenocide.org

Save Darfur.org :: Violence and Suffering in Sudan's Darfur Region
http://www.savedarfur.org/
Oct 13 '05 #22

P: n/a
Eric B. Bednarz said the following on 10/13/2005 21:33 +0200:
Harrie <sp*****@linux.org.invalid> wrote:
Lachlan Hunt said the following on 10/13/2005 19:24 +0200:
It's an XML DTD. It's similar to an SGML DTD, but not quite the
same.


It doesn't begin with an xml prologue, or am I too narrow minded?
I ment an XML declaration here, but that's part of a prolog.
Pardon? A DTD is *part* of the prolog -- it's an optional part of the
document type declaration which itself is an optional part of the
prolog.
Of the document, yes, but I was talking about the DTD itself. The DTD looks like SGML to me, I can't see it's XML. But I just read in my XML book that a document prolog is optional, so I can't conclude from not seeing an XML declaration that it's not XML (I think this is what you refer to in your last sentence).

Still, I would expect some (hopefully clear) differences between SGML and XML DTD's.
Can you give me some pointers where an XML DTD is explained?


The XML spec would be a good guess, I guess.
<http://www.w3.org/TR/REC-xml/#elemdecls>
<http://www.w3.org/TR/REC-xml/#sec-entity-decl>


Thanks, I've read most of the XML Recommandation before, but I'll study it again, I might have missed something.
(note that XML markup declarations have just some restrictions compared
to SGML, so you might be able to look at an arbitrary external DTD
entity and possibly determine 'this cannot be an XML DTD', but you
cannot conclude 'this *is* an XML DTD')


I think this is where my confusion is based on. It's those restrictions compared to SGML I'm looking for and try to understand.

--
Regards
Harrie
Oct 13 '05 #23

P: n/a
Harrie <sp*****@linux.org.invalid> wrote:
Pardon? A DTD is *part* of the prolog -- it's an optional part
of the document type declaration which itself is an optional part
of the prolog.
Of the document, yes, but I was talking about the DTD itself.


The DTD is also part of the document.
The
DTD looks like SGML to me, I can't see it's XML. But I just read
in my XML book that a document prolog is optional so I can't
conclude from not seeing an XML declaration that it's not XML
DTDs don't have XML declarations. _Documents_ have XML declarations
in the prolog, of which the DTD also is a part, like Eric Bednarz
said.

Also, to be pedantic, the prolog is technically not optional. It's
always there, but it doesn't have to contain anything:

prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?
Still, I would expect some (hopefully clear) differences between
SGML and XML DTD's.


See http://www.w3.org/TR/NOTE-sgml-xml.html

--
David Hsther
Oct 13 '05 #24

P: n/a
Gus Richter wrote:
I'm not negating your points at all. I think that your points are well
made and are good to know. I do, however, think that in the context of
this discussion, a new author may be mislead or confused regarding the
differences between HTML and XHTML by the statement:

"HTML must have all elements closed, just as XHTML must."


You snipped this bit: "The difference is that SGML allows elements to be
closed by inference from the DTD and the appearance of some other
element that couldn't be contained inside the current element (implying
necessary closure) - XML however doesn't have this ability and so all
elements must be closed explicitly in the document source."

HTML must have all elements closed, but it doesn't need to have all elements
closed explicitly.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Oct 13 '05 #25

P: n/a
"David H���������������� ����������" said the following on 10/13/2005 23:36 +0200:
Harrie <sp*****@linux.org.invalid> wrote:
Pardon? A DTD is *part* of the prolog -- it's an optional part
of the document type declaration which itself is an optional part
of the prolog.
Of the document, yes, but I was talking about the DTD itself.


The DTD is also part of the document.


The Document Type Declaration is part of the document, the Document Type Definition is refered to by the former, but I was talking about an external DTD like:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd

I was expection an XML declaration there, but as I said earlier, that expectation is wrong, since it's optional.
The
DTD looks like SGML to me, I can't see it's XML. But I just read
in my XML book that a document prolog is optional so I can't
conclude from not seeing an XML declaration that it's not XML


DTDs don't have XML declarations. [..]


Why? Isn't an XHTML DTD an XML file itself (in the way than an XSL file is an XML file)? If not, is it SGML (I think not, Lachlan Hunt said it's XML, if I interpret him correctly), or what else is it? That's my confusion.
[..] _Documents_ have XML declarations
in the prolog, of which the DTD also is a part, like Eric Bednarz
said.
On which I agreed, but I wasn't refering to a document itself.
Also, to be pedantic, the prolog is technically not optional. It's
always there, but it doesn't have to contain anything:

prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?


Hmmm, so the prolog my be empty, but what does 't look like then, an empty line?
Still, I would expect some (hopefully clear) differences between
SGML and XML DTD's.


See http://www.w3.org/TR/NOTE-sgml-xml.html


It looks like this is what I nead to read, thanks a lot!

--
Regards
Harrie
Oct 13 '05 #26

P: n/a
Harrie wrote:
"David Håsäther" said the following on 10/13/2005
Also, to be pedantic, the prolog is technically not optional. It's
always there, but it doesn't have to contain anything:

prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?


Hmmm, so the prolog my be empty, but what does 't look like then, an
empty line?


No, if it's empty, it doesn't look like anything. A document is defined as:

[1] document ::= prolog element Misc*

and the prolog is defined as above. So, the prolog is required and is,
therefore, always present, but as David said, doesn't have to contain
*anything*. If it contains nothing, it's not represented an empty line.
It's just there, but not physically.

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Oct 13 '05 #27

P: n/a
Harrie <sp*****@linux.org.invalid> wrote:
The Document Type Declaration is part of the document, the
Document Type Definition is refered to by the former,


Nope; you have a fundamental -- but common -- misunderstanding here;
the document type declaration subset -- the formal DTD -- is always a
syntactical part of the document, no matter if that subset is internal
or -- partly or completely -- external.

The formal public and|or system identifier are syntactically no
different from an ordinary puclic|system entity declaration and
reference in the internal subset, it's just a matter of convenience in
terms of notation.
--
Goodbye and keep cold
Oct 13 '05 #28

P: n/a
On Thu, 13 Oct 2005 12:22:09 -0400, Gus Richter
<gu********@netscape.net> wrote:
"HTML must have all elements closed, just as XHTML must."

The established rules for HTML clearly state that there are optional
opening/closing tags and empty elements which must not have a closing
tag. XHTML on the other hand dictates that there are no optional tags
and that all elements must be closed.
The fallacy is to equate elements and tags.

It's general practice to confuse them entirely. In this newsgroup things
are a bit better, but there's still a view that "an element is a pair of
tags". It isn't - an element is fundamentally a DOM-level notion, a tag
is a serialisation-level thing. Thinking that "elements exist in the
document" makes it hard to see how HTML elements can ever close
automatically. Thinking instead of the DOM, which obviously is a tree of
nodes (many of which are elements) and instead thinking the other way
round - asking what's the scope in the document of these element's
extents, is a much more obvious mapping.

When attending a play, one goes for the performance and not for what
goes on behind the scenes,
Whilst I don't expect an audience to understand Ionesco's clear
preference for HTML 3.1 over 4.0 when typesetting La Cantatrice Chauve,
this _is_ the sort of thing I expect from a playwright. You don't need
it to consume the product, but it does help for sophisticated levels of
authoring.
Likewise, an author creates a document according to the
established rules as set out and should not have to consider behind the
scene browser parsing methods, nor historical reasons for such rules.
This is why XML has taken off in a way that SGML never did. XML has
simple and explicit rules, which anyone can follow. Nor do you need a
DTD to be able to parse it.
In the context of the question by the OP,


Screw that. This is Usenet, this is a thread. Deal with it. The OP is a
hit-and-run one-line questioner from some dreadful web porthole. There
may be "no stupid questions", but there are certainly those that don't
go out of their way to invite a worthwhile answer. A proper Buddhist
response to such questions like "What is the essence of the Buddha's
teachings" is to hit the student firmly with a stick. We should have
more of that on Usenet.
--
Inbreeding - nature's way of always giving you enough fingers to count your cousins
Oct 13 '05 #29

P: n/a
David Dorward wrote:
Gus Richter wrote:

I'm not negating your points at all. I think that your points are well
made and are good to know. I do, however, think that in the context of
this discussion, a new author may be mislead or confused regarding the
differences between HTML and XHTML by the statement:

"HTML must have all elements closed, just as XHTML must."

You snipped this bit: "The difference is that SGML allows elements to be
closed by inference from the DTD and the appearance of some other
element that couldn't be contained inside the current element (implying
necessary closure) - XML however doesn't have this ability and so all
elements must be closed explicitly in the document source."

HTML must have all elements closed, but it doesn't need to have all elements
closed explicitly.


And you snipped this bit:

"The established rules for HTML clearly state that there are optional
opening/closing tags and empty elements which must not have a closing
tag. XHTML on the other hand dictates that there are no optional tags
and that all elements must be closed."

What I'm saying is that these rules are per the latest documents in
question. There is no sense in negating this and pointing out what SGML
has to say on the subject, especially if it relates to browser parsing,
which has no bearing on the subject rules of authoring for HTML 4.01 or
XHTML (whatever) and only serves to confuse the issue/question raised here.

I tried years ago to get a copy of SGML and IIRC had a devil of a time
finding the URL and once I found it, I was asked to purchase it. There
are enough people voicing their knowledge on SGML as witnessed here; as
though it really mattered. The Recommendations by themselves are written
to provide sufficient information for the author without the need to
dust off old documents such as SGML. Browser developers/programmers of
course must have access to the SGML document.

--
Gus
Oct 14 '05 #30

P: n/a
Andy Dingley wrote:

The established rules for HTML clearly state that there are optional
opening/closing tags and empty elements which must not have a closing
tag. XHTML on the other hand dictates that there are no optional tags
and that all elements must be closed.


The fallacy is to equate elements and tags.


Wherein my four lines do you read such fallacy?

[Snipped theatrics]
In the context of the question by the OP,


Screw that. This is Usenet, this is a thread. Deal with it. The OP is a
hit-and-run one-line questioner from some dreadful web porthole. There
may be "no stupid questions", but there are certainly those that don't
go out of their way to invite a worthwhile answer. A proper Buddhist
response to such questions like "What is the essence of the Buddha's
teachings" is to hit the student firmly with a stick. We should have
more of that on Usenet.


Yep, anonimity is great isn't it? Jeez!
I prefer to take questions in good faith until proven otherwise. Some
people don't have enough information to ask a question properly. I think
that it was a fair question. It was answered and you chose to correct
the answer with what I believe to be misleading information and not to
the point. I respond in order to correct. You don't like it. You deal
with it.

--
Gus
Oct 14 '05 #31

P: n/a
On Thu, 13 Oct 2005 20:13:17 GMT, Matt Silberstein
<Re**************************@ix.netcom.com> wrote:
So the XHTML is more restrictive *on me*.


What's easier to do? One hard thing, or two simple things?

XML is perhaps more verbose than SGML, but it's _simpler_. You can
explain and understand the lexical rules and these rules are the same
for all XML documents, not DTD dependent.

Oct 14 '05 #32

P: n/a
In article <g-********************@giganews.com>,
Jim Moe <jm***************@sohnen-moe.com> wrote:
Cornel Bicutzi wrote:

What is the difference between HTML and XHTML...

Visit <http://www.w3.org/>. Everything you wanted to know about HTML
and XHTML.


Nope.

The W3C is reluctant to give information that makes their members look
bad and information that suggests you shouldn't adopt the latest spec
right now. And that kind of information is usually of practical
importance and, hence, something you'd probably want to know.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Oct 23 '05 #33

This discussion thread is closed

Replies have been disabled for this discussion.