HighDots Forums  

length of html attribute

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss length of html attribute in the HTML forum.

Reply
 
Thread Tools Display Modes
  #1  
Old   
Oliver Block
 
Posts: n/a

Default length of html attribute - 05-18-2006 , 04:11 PM






Hi,

I did not find any length limit for attributes. Is there any? Maybe
"inherited" by SGML?

Best Regards,

Oliver




Reply With Quote
  #2  
Old   
Benjamin Niemann
 
Posts: n/a

Default Re: length of html attribute - 05-18-2006 , 04:30 PM






Oliver Block wrote:
Quote:
I did not find any length limit for attributes. Is there any? Maybe
"inherited" by SGML?
The SGML declaration (http://www.w3.org/TR/html40/sgml/sgmldecl.html)
declares a maximum length of 65536 characters, which is the largest value
that SGML allows and which comes closest to the 'intended limit' of 'no
limit'.
If you write a HTML parser, do not implement size limitations. If you are
authoring HTML code, you'll win a prize, if you manage to exceed the 64k
limit with meaningful data...

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/


Reply With Quote
  #3  
Old   
Andy Dingley
 
Posts: n/a

Default Re: length of html attribute - 05-19-2006 , 04:57 AM




Benjamin Niemann wrote:

Quote:
If you write a HTML parser, do not implement size limitations. If you are
authoring HTML code, you'll win a prize, if you manage to exceed the 64k
limit with meaningful data...
Been there, done that.

For metadata embedding, it's (reasonably) common practice to embed
annotations and descriptions as attributes that are lifted from a
Dublin Core (or similar) "pseudo-namespace". These aren't part of valid
HTML, but XML namespacing isn't really available to the web yet and
it's long-established web practice that extra attributes are silently
and safely ignored by user-agents that don't understand them.

Once you're adding annotation or metadata, it's not hard to start
breaking 64k length limits, if you're unaware of the issue.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.