HTML - what does it mean when it says an attribute can have a string datatype as its value in laymans terms?
I was wondering what does a string datatype value for an attribute mean. does it mean I can use letters and number for the attributes va开发者_运维百科lue? What are its restrictions?
A string is usually just any "string" of characters (numbers, letters, symbols, etc). In the context of HTML and attributes specifically, I recommend checking out this w3c page:
http://www.w3.org/TR/html-markup/datatypes.html
Note that there are different restrictions if the attribute is unquoted, single quoted, or double quoted.
精彩评论