Sp 122

From Htmlpedia
Revision as of 08:23, 21 July 2007 by Mgueury (talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

OpenSP: Character %1 is not allowed in the value of attribute %2


Each attribute belongs to a category. And for some types, their values are restricted. Here are the categories of attributes:

  • CDATA is a sequence of characters
  • ID and NAME must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
  • IDREF and IDREFS are references to ID tokens defined by other attributes. IDREF is a single token and IDREFS is a space-separated list of tokens.
  • NUMBER tokens must contain at least one digit ([0-9])


<a> attribute "id" has invalid value "567" The attribute ID is of type ID. As described above, it should begin with a letter and have no spaces

Bad<a id="567" href="/index.html">
Good<a id="n567" href="/index.html">

<img> attribute "width" has invalid value "740px" HTML width and height attributes do not need "px"; their units are always assumed to be pixels.

Bad<img src="example.png" alt="Example" width="740px" height="40px" />
Good<img src="example.png" alt="Example" width="740" height="40" />


To find the type of the attribute, search the tag name (here) and check its definition.