> > > > > > Well, that's a little different. If you want to write HTML > > > > > > that will comply with XHTML, you have to close every tag, > > > > > > even BR and HR tags which would never contain anything - > > > > > > that's just the nature of XML. > > > > > > > > > > Tags that do not have closing tags only need a slash at the > > > > > end. Like <br />. > > > > > > > > When you put that slash in the end, you are closing that > > > > element. In XML, these two notations are semantically identical: > > > > > > > > <br></br> > > > > <br /> > > > > > > Maybe I misread but this was about xhtml not xml. In xhtml > > > you do not need to explicitly close tags like <br> with a </br>. > > > One <br /> is good enough. > > > > I think we're essentially saying the same thing. However, > > XHTML is XML - XHTML is an XML-compliant language. A valid > > XHTML document is, by definition, a well-formed and valid XML > > document. In any XML language, including XHTML, each element > > must have a start and end, and you have two ways to write that, > > as previously shown. > > I don't know what you are getting at but here ... > http://www.utoronto.ca/webdocs/HTMLdocs/NewHTML/xhtml.html > > "Empty" tags must be written with an extra slash at the end. > An empty tag is one like <br> or <img src="foo.html"> that doesn't > have a </br> or <img> to end it. In XHTML, such tags must be > written as: <br />, and <img src="foo.gif" />.
>From the definitive document on XHTML: http://www.w3.org/TR/xhtml1/ "XHTML 1.0 (this specification) is the first document type in the XHTML family. It is a reformulation of the three HTML 4 document types as applications of XML 1.0. ... XHTML documents are XML conforming. As such, they are readily viewed, edited, and validated with standard XML tools." In other words, XHTML is a specific XML language. This means that XHTML follows the same syntactical constraints as any other XML language. Now, within any XML language, each element (what we'd normally refer to as a "tag" in HTML) must have a start and an end. If an element is empty, you can denote the end within the single element "tag" with a closing slash. You don't have to do that, however, and either syntax is valid. Again, to quote from the above link: "4.6 Empty Elements Empty elements must either have an end tag or the start tag must end with />. For instance, <br/> or <hr></hr>." So, I guess I don't know what you're getting at, but hopefully this will clarify what I'm getting at. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

