Re: Maximum length for element name
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 May 2006 21:26:00 +0100
Dave Anderson wrote:
Praveen wrote:<snip>
Is there any restriction for the length of element
names? Whats the maximum length given for an input
element.
Looks unlimited to me, at least in principle:
"ID and NAME tokens 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 (".")."
http://www.w3.org/TR/html401/types.html#type-cdata
If "the length of element names" means the length of the values of the
NAME attributes of form controls then that section does not apply, and
the preceding section on CDATA is applicable.
ID and NAME tokens apply to ID attributes and a few NAME attributes on
elements such as META.
As I recall the SGML spec implies/imposes an upper limit to the length
of attribute values somewhere around 64 K characters. I doubt that has
been fully carried through to HTML web browsers, though I recall Opera 7
refusing to recognise an event handling attribute where the value
exceeded 64 k characters (and then not having a problem with 32-ish K
characters) in an XHTML document[1].
Richard.
[1] You may recall (or have never cared) that the XHTML implementations
in Opera 7 versions did not recognise script elements but would execute
intrinsic event handling attribute code. I wanted to look at the XHTML
DOM in that browser, for academic reasons, and so wanted to load a DOM
inspector script. Without Opera allowing the successful inclusion of
scripts with script elements I had to put the script in event handling
attributes, and the size limit then required splitting it between two.
.
- Follow-Ups:
- Re: Maximum length for element name
- From: Dave Anderson
- Re: Maximum length for element name
- References:
- Maximum length for element name
- From: Praveen
- Re: Maximum length for element name
- From: Dave Anderson
- Maximum length for element name
- Prev by Date: Re: Maximum length for element name
- Next by Date: Donwloading image status messsage
- Previous by thread: Re: Maximum length for element name
- Next by thread: Re: Maximum length for element name
- Index(es):
Relevant Pages
|