W3C home > Mailing lists > Public > www-html@w3.org > February 2000

Re: naming custom/extended tags

From: Dan Connolly <connolly@w3.org>
Date: Fri, 11 Feb 2000 19:07:53 -0600
Message-ID: <38A4B269.E44FF6DF@w3.org>
To: Michael Blow <michael.blow@propel.com>
CC: "'www-html@w3.org'" <www-html@w3.org>
Michael Blow wrote:
> Are there any W3C recommendations on how to name a custom tag?  We need to
> define a few custom tags, and want to following any naming standards that
> may be in place, to minimize potential conflict.

Take a look at this example from the XHTML spec:


The following example shows the way in which XHTML 1.0 could be used in
with the MathML Recommendation:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <title>A Math Example</title>
    <p>The following is MathML markup:</p>
    <math xmlns="http://www.w3.org/1998/Math/MathML">
      <apply> <log/>
          <cn> 3 </cn>
        <ci> x </ci>

So the idea is
	-- document your extended vocabulary in the web, say, at
		(consider using XML Schemas for this
		http://www.w3.org/TR/xmlschema-1 )
	-- xml-ize your HTML (include all the end tags, make emtpy
		tags explicit ala
		<br class="x"/> or <br /> in stead of <br/> etc.
		see the guidelines at
		for details and
		http://www.w3.org/People/Raggett/tidy/ for a tool
		that can do a lot of the work automatically)
	-- use XML namespaces to associate your markup with
		your vocabulary documentation

Putting it all together, you get something like:

<html xmlns="http://www.w3.org/1999/xhtml"
    <title>An extended web page</title>
    <div catalog:sku="234234232"><h2>4" Widgets</h2>
     <p>now available for only <catalog:price

Dan Connolly
Received on Friday, 11 February 2000 20:11:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:52 UTC