I’m brand new to HTML and XHTML, and very much looking forward to learning it. My question will probably seem ridiculously simple to whomever reads this. But we all have to crawl before we walk, right?
Anyway, I’m reading Ian’s book, "Build Your Own Website . . . ", and I’ve been doing all the exercises religiously. The very first one contains the following meta tag, which I’m sure you’ll recognize:
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8”>
But when I included that in the markup, saved it to a file and tried to open it in Firefox, I got a blank page. Of course, I had no way of knowing that this particular element was the source of the problem. But I found out PURELY by accident. I started over and was very careful to type everything exactly as it appeared in the book – except that THIS time, I inadvertently hit the shift key, and typed this instead:
<meta http-equiv=“Content-Type” content+“text/html; charset=utf-8”>
It took me a few minutes to inspect everything and see what I had typed differently. But as it turned out, that little 'ol “plus” sign made all the difference in the world. The page now opened in my browser.
But why did this happen? Had I not accidentally hit that shift key, I’d probably STILL be trying to figure out what I did wrong. I was lucky – this time.
So what’s the deal with this encoding meta-tag? Why the discrepancy with what was in the book? And which way is the right way? Are there other places where I will have to make a similar substitution?
I’ve moved on to other exercises in the book, and all goes well. But that question keeps nagging at me. So I figured it was probably time for my first post A little insight would really be appreciated.