html - How to code the value of input[type="submit"] that validates -
two questions
- what best way encode rarer characters form element values?
- is semi-colon in example below causing validation error or else?
html
<input type="submit" value=""> validation error:
document uses unicode private use area(s), should not used in publicly exchanged documents. (charmod c073) the value of element causing error. need recode decimal value render glyph , validates.
it not matter much. decimal character reference , hexadecimal character reference both work ok (with no real difference). using character such in utf-8 encoded document may make code more readable, though encoding must utf-8 , must declared utf-8. , in case of private use code point, using, when viewing source, programs may show anything. private use code points have no defined meaning; allocation of character such code point agreement between interested parties. , favorite code editor has hardly made such , agreement.
no, semicolon correct. warning (not error message) not based on html specification or draft on w3c recommendation known charmod (character model world wide web 1.0: fundamentals). warning refers item c073 there: “publicly interchanged content should not use codepoints in private use area.”
on practical side, code fails whenever specific, privately encoded font not used, e.g. because browser has been set ignore font faces suggested on web pages or because font fails load. better use image, appropriate alt text, using either <input type=image> or <button> containing <img>.
Comments
Post a Comment