HTML and XHTML are not the same, and every version of
HTML is an application of SGML
No. XHTML is eXtensible HTML. That's what it stands for, and it was
named that because that's what it is.
I am sorry, but that is incorrect. XHTML is HTML's
successor, not merely the XML version of HTML. The goal of
XHTML is to replace HTML with a saner, reformulated model for
representing hypertext on the web. Yes, the initial versions of XHTML
were designed to be backward compatible with HTML, but that goal is
only for transition; XHTML 2, for instance, breaks compatibility with
HTML and enters entirely new territory. Got it? HTML is one family
of markup languages, whose line ended with HTML 4, and XHTML is
another family of markup languages that replaces HTML and whose
initial versions are backward compatible with HTML.
XHTML "is" HTML only the layman's sense that HTML means "the
mysterious stuff programmers write to make web pages."
Yes, if Perlmonks pages are served out as HTML4, then
it's technically okay to omit closing tags as per the HTML4 spec, on
Perlmonks.
It is not just "technically okay" but perfectly acceptable. If the
document type is HTML 4, you are absolutely, positively allowed to use
markup minimization. You don't make a web browser's job easier or
earn markup karma by using XML markup in HTML documents. If the browser can handle HTML, it knows SGML
parsing rules, and it can handle markup minimization just fine.
As a rule, however, [using HTML
markup] is a bad habbit of which you should really try to
break yourself as soon as possible, for a wide variety of
reasons.
You can't just make up your own rules that "HTML is bad" and
ignore document types. Please understand that document types mean
something. If you're writing HTML 4, you ought to use HTML 4's
markup model. You can't just say, "Writing in HTML is a bad habit;
use XHTML markup instead" because that advice will be wrong for most
of the sites on the web, which still serve up their content as HTML.
Use the markup that conforms to the document type.
Cheers, Tom
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|