I’ve been trying to fully understand XHTML recently, and I’ve mainly learned that things must be closed, full-length, and lowercase. I’ve always done these things, as it just seemed like good practice, so I’ve basically only got to remember the DOCTYPE tag. However, I’d like to know if these same principals apply to hex colors. For example, would three-character codes, such as #fff, be acceptable? Would uppercase codes, such as #FBACFF, violate the “no capital <TAG>” rule? It seems cleaner to use 6-character capital to me, but is this XHTML compliant?
I’ve been trying to fully understand XHTML recently, and I’ve mainly learned that things
Share
Colors, as you represent them in your question, are attribute values, not tags, not elements, not attribute names, so their capitalization (or lack of capitalization) has no bearing on the validity of an XHTML document. You are free here to represent colors as you like.