Tuesday, April 28, 2015

May I use a space inside of an id tag in HTML?

No! Don't be stupid. Duh. This details the HTML4 and HTML5 standards for element naming and neither of them allow it. The HTML4 standard is a little more restrained than that of the HTML5 standard and I'd just do things it's way to accomodate both. That criteria: 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 (".").

No comments:

Post a Comment