utf 8 - HTML charset metatag - what charset should I specify? -
i ran html file writing through this on-line html validator, , 1 of diagnostics got said,
the character encoding not declared. proceeding using "windows-1252".
when create webpage, write in text editor, saves dos-text (with cr-lf line endings). when upload file web-hosting provider, gets converted (i think) on server unix text (lf line endings). text editor can save files unicode including utf-8, find necessary.
the standard online advice specifying character encoding in web document include, under <head>
tag, <meta charset="utf-8">
. there advice should ensure specify not conflict information sent server in http headers when serving document. using rex swain's [online] http viewer, see in http headers says,
content-type:·text/html
should follow standard advice specify charset utf-8, though html file never saved such, or should specify windows-1252, assumed online validator, or iso-8859-1 per 1 of example values on w3schools? also, examples of charset metatag show terminated />
. preferred syntax, , should there space before slash?
Comments
Post a Comment