Total novice question re: meta element

Hello,

am working my way through the Build Your Own Web Site Book (2nd Ed) and am curious if these two statements are functionally identical based on the case of the charset value:

<meta http-equiv=“Content-Type” content=“text/html; charset=UTF-8”>

vs

<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8”>

Thanks!
-Paul

Yes, the are essentially the same. Although personally I prefer to use upper-case UTF-8 the ‘charset’ values are basically case-insensitive unlike XHTML elements.

thanks! so for XHTML the code should be:
<meta http-equiv=“Content-Type” content=“text/html; charset=UTF-8”/> ?

Yes either UTF-8 or utf-8 if you are declaring it by using the META element and charset attribute (the book probably chooses lowercase for typographical constancy and so not to confuse readers).

Albeit there are other methods of declaring character encoding in XHTML 1.x which the book completely forgets to tell you about.

For example applying the encoding declaration of the XML declaration on the first line of the page, i.e. <?xml version=“1.0” encoding=“UTF-8”?> The book doesn’t cover that because it is ‘dumbing things down’. To make it easier for a newbie or if you use HTML 4.01 syntax or treat XHTML 1.0 as if it were HTML.