I want to convert some old html pages to xhtml transitional. These are simple static pages and I've figured out how to do all parts of the conversion except for one problem. Here it is: The instructions say to use a document type definition that specifies utf-8. So when I save the code in NotePad, I thought I should choose utf-8 as the format. But when I try to validate a page at http://validator.w3.org, it validates as xhtml transitional okay, but I also get a warning message about something called a byte order mark (BOM). I did some searching and found an article that says that NotePad automatically inserts this BOM in all saved documents. But the warning at http://validator.w3.org says that it might cause problems. Right now I'm having to use a rented computer and don't have any other editors except NotePad. So there's my problem. I did some experimenting and found that if I save a page as ANSI instead of utf-8, it passes validation without this warning about a BOM. So does anyone know what format I should use to save these pages before I upload them? Can I use ANSI? Or am I suppose to use utf-8, even though I get this warning? Thank you
You don't need to save your xHTML file in any special format. You just need to define a character set in the head section like this directly after the opening <head> tag: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Then you will also want to declare the doc type before the head section. Here is the doc type for xHTML transitional: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> I would recommend using notepad++ for editing html. It's free to download and it's way better than windows notepad.
Here is an easy to read article on the subject: http://www.easy-online-money.net/?p=35 At the end of the article the author recommends using notepad++ to remove the bom.