Re: XHTML Programming Style (not <style>)

by "Darrell King" <darrell(at)webctr.com>

 Date:  Thu, 22 Mar 2001 14:31:50 -0500
 To:  "HWG-Basics" <hwg-basics(at)hwg.org>
 References:  celticblues
  todo: View Thread, Original
Nope...it's personal to the programmer.  Even your C++ style guide
is only subjective, being used by your company and anyone else
that chooses, but might be one of many such documents.

I definitely think personally  indentation and whitespace should
be used with common sense, as your second example indicated.

Browsers sometimes mess up intelligent choices, though...for
instance, some Netscape versions will treat a newline immediately
preceding a closing td as visible whitespace when rendering the
document.

D

----- Original Message -----
From: "Ed Peddycoart" <ed(at)celticblues.com>

Where I work, we have a small, but useful, document that contains
guidelines
that ultimately control the readability of our code (mostly C++),
and other
things that make life easier.  Is there such a beast for XHTML?
For
example, I would consider the following bad, although it does
validate
without errors:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC
"-//W3C//DTD
XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"><html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en"><head><title>Minimal XHTML-Strict
Template</title></head><body><h1>This is minimal
XHTML-Strict</h1></body></html>

I would think something like the following would be
preferrable....

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
  <head>
    <title>Minimal XHTML-Strict Template</title>
  </head>
  <body>
    <h1>This is minimal XHTML-Strict</h1>
  </body>
</html>

Is there a guildine that is generally accepted on levels of
indention, and
so on, for XHTML?

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA