Re: Critique Request

by Gerhard Schoening <g.sch(at)onlinehome.de>

 Date:  Wed, 13 Mar 2002 21:21:16 +0100
 To:  jonathanjo(at)mindspring.com
 Cc:  hwg-critique(at)hwg.org, "'Stephanie Thrasher'" <steph(at)omsoft.com>
 References:  springmail
  todo: View Thread, Original
Hello jonathanjo,

On Wednesday, March 13, 2002 at 15:37 you wrote:

> <.td colspan="2" width="723"><img
> src="images/banner15.jpg" alt=" John L. Hancock - Aviation
> Safety Consultant, LLC" width="723"
height="80" />>

> The trailing "/" at the end of the tag is for tags that do
> not have a corresponding closing tag, like <.br /> or
> <.img />, in XHTML. Your <.td> tag does have a closing
> tag, so you don't need a "/".

This is not correct:

- Stephanie's pages are of doctype XHTML 1.0 Transitional.

- XHTML is HTML 4, written as an application of XML.

- XML documents need to be well-formed.

- A well-formed XML document requires every start tag to
have a corresponding closing tag: here, it's the 'td' tag.

- An empty tag (that is, a tag that has *no content* but may
have *attributes*) - like 'img' here - is required to have
an ending slash, preceeded by one space.

Please compare:

*XML snippet*

<.tag attr="attr_content">arbitrary_content<./tag>

arbitrary_content might be an empty tag like
<.tag attr="attr_content" />.

Now we have

<.tag attr="attr_content"><.tag attr="attr_content" /><./tag>


This corresponds exactly to *XHTML snippet*

<.td colspan="2"><.img src="image.jpg" /><./td>


Stephanie's code snippet is correct.

-- 
Best regards,

Gerhard



http://www.cp-web.com
gerhard(at)cp-web.com


http://www.schoening-online.com
gerhard(at)schoening-online.com

HTML: hwg-critique mailing list archives, maintained by Webmaster @ IWA