Can anyone explain this to me? Recently I have noticed that when I put together web sites and I enter the pound sign £ into html code it comes up as a question mark. so £1.50 becomes ?1.50 It never used to do this. It is very frustrating when I actually want to show a pound sign and the question mark comes up. I use templates that are put up on sites like http://www.oswd.org maybe they are adding something in the CSS files that stops £ signs from showing? Can someone tell me what I can type in to make a pound sign show up?
charset charset charset. The template may have a meta tag (near the top, in the <head>) which states something like <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> The example above is from HTML4 and says UTF-8. The other popular one is ISO-8859-1. First, you should have this in your <head> unless you're serving this as XML (which I doubt : ) Second, the server hosting this page must match up with its HTTP headers. If the server says charset=ISO-8859-1 and your page says charset=utf-8, the server will override the page. But, it might make ?'s. Third, since I don't know if this is HTML or XHTML, stay safe and use Unicode or ascii character entities (as greboguru did above-- you beat me to it). If you're typing £ from the keyboard, don't. Use & # 163 ; (added spaces so that it would display). Don't use the £ ; unless you're very sure this will never ever end up on an XML document (most web sites don't anyway though). Otherwise, for plain old HTML £ ; (without space) is fine. ? means the browser has no clue what that thing is. You may also find it on © apostrophes and slashes.
Thank you for helping me. In the head part I have: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> I replaced the pound sign with & #163 ; (removing the spaces) and it worked perfectly. Thanks again guys.
So your HTTP header might be a different charset. If you have a hosting provider, they can either change it for your site (since we do still want the two to match) or look at your page's info in your browser to see what their server is using and you could change your site over to that (both are western latin so generally the two look the same on most Western web pages). If you make any changes to your html file regarding charset, the editor you are changing it in MUST also save the file with this encoding as well. I forgot about that, but all THREE must match. Common programmes like Notepad usually ask you when saving a new document. For changing one, when you go to save, try SaveAs instead so you can set the new charset.