Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


titleQuick reference

A quick reference note from BookNet Canada. Please see below for suggestions on options on embedding HTML (escaping vs CDATA and the best option, using XHTML with tags).

  • Remember that you're embedding your HTML in another company's webpage.  Anything that could affect their CSS or formatting and any use of a URL will likely result in your work being stripped or not loaded.  Header tags (h1, h2 etc) should NOT be used as they would interfere with the retailer's webpage.
  • Simple, clean, noninvasive XHTML is what belongs in appropriate in ONIX elements
  • The full list of appropriate elements is below but text blocks – descriptions, and biographical information – are appropriate.  All other data elements should NOT include any HTML, page returns or formatting of any kind. This includes Title and Contributor elements. Think of it this way: Data in ONIX is used by to fill data base fields and for indexing. Anything that doesn't belong in a database field can create problems, data loss and indexing issues. (ONIX 3.0 solves some of the need for formatting with specific "display" elements that are XHTML enabled, including one to display the Title and another for Contributor Statement.)
  • If you don't know anything about HTML there is more information in Editeur's Best Practices. is a good place to start and this explains the X in XHMTL Someone in your company is likely creating ebooks and would understand the terms being used here.

These general best practices are best to follow as they are part of XHMTL:

  • All copy should be enclosed with HTML tags – normally use a paragraph tag <p>copy</p> but <ul> <ol> and <dl> are other options (these are called "block options" below)
  • Use lower case tags <p> are preferred to <P>
  • Close all tags appropriately <p> is closed by </p>. Some tags are "self closed" and you should use <br /> instead of <br>
  • Nest tags appropriately <p><i>copy</i> copy</p> but NOT <i><p>copy</i> copy</p>

The following tags are recommended (others are problematic or prohibited) and this applies to both HTML (using CDATA or escaping of the < character) and XHTML (using HTML tags within text blocks and allowing XML processing rules apply to your tags. This option is the recommended one, but it's best supported by regular use of XML schema validation to ensure it's accuracy.)

<p> and <br /> – paragraphs and line breaks
<i> and <em>, <b> and <strong> – italic and bold emphasis
<cite> – for book titles
<ul>, <ol> and <li> – bulleted and numbered lists

<sub> and <sup> – sub- and superscript
<dl>, <dt> and <dd> – definition lists

ONIX implementers

In ONIX – whether version 2.1 or 3.0 – there are many common issues that arise when data providers embed HTML within the various textual data elements. Data providers deliver HTML in a variety of different ways – some which match the standard, many which don’t. And this means that for data recipients, the complexity of receiving so many unpredictable variations forces them to choose to just ignore all HTML – whether it matches the standard or not – or to treat each data file as unique (which adds unnecessary cost and time). This isn’t good for either senders or recipients.


Option 1. is preferred in all cases. If you cannot use XHTML, then 2. is preferred over 3. in ONIX 3.0, and in ONIX 2.1, 2. and 3. are equally preferred.

Common errors

The first common error is simply omitting the necessary textformat attribute. When embedding HTML, you must always include the attribute textformat="02", as the default when you omit it is ‘plain text’. If you’re using XHTML, then you must use textformat="05".


There is complete list of XHTML and HTML tags – allowed and disallowed – within the ONIX 3.0 Implementation and Best Practice Guide.

There is only a small list of ONIX data elements in which HTML or XHTML markup is acceptable. For example, in ONIX 3.0, <BiographicalNote> can contain markup, but <ProductFormDescription> cannot. Here’s the complete list of data elements where markup can be used: