name-value

What characters are allowed in an HTML attribute name?

喜你入骨 提交于 2019-11-26 17:33:45
In HTML attribute name=value pairs, what are the characters allowed for the 'name' portion? ..... Looking at some common attributes it appears that only letters (a-z and A-Z) are used, but what other chars could be allowed as well?... maybe digits (0-9), hyphens (-), and periods (.) ... is there any spec for this? Alohci It depends what you mean by "allowed". Each tag has a fixed list of attribute names which are valid, and in html they are case insensitive. In one important sense, only these characters in the correct sequence are "allowed". Another way of looking at it, is what characters

What characters are allowed in an HTML attribute name?

。_饼干妹妹 提交于 2019-11-26 05:29:33
问题 In HTML attribute name=value pairs, what are the characters allowed for the \'name\' portion? ..... Looking at some common attributes it appears that only letters (a-z and A-Z) are used, but what other chars could be allowed as well?... maybe digits (0-9), hyphens (-), and periods (.) ... is there any spec for this? 回答1: It depends what you mean by "allowed". Each tag has a fixed list of attribute names which are valid, and in html they are case insensitive. In one important sense, only these