Reader Question: Converting a large site from HTML to XHTML
- How easy or cumbersome is it to convert a fairly large website from HTML to XHTML? (it looks to me as though there was no quick and easy way);
- and taking this into account, is it possible to have some pages in HTML and others in XHTML?
My Thoughts
Bottom line: it's not easy. There are some programs that advertise that they'll do it for you at the push of a button, but I've never found one that works effectively.
Here's how I managed the conversion of a site with over 1 million pages from HTML to XHTML:
1 page at a time.
Seriously. Some of those pages and site sections were built dynamically (with a database) so we just had to convert the template to XHTML, but in most cases, it was a matter of when we came across a page that was HTML, we'd convert it.
You're not going to hurt yourself or your site by having some pages in HTML and some in XHTML (okay, there are SOME situations where that could cause problems, but they're rare, and if you were in it you would know...) Start with your highest traffic pages and the pages you want to rank best in search engines, and convert them. Then work on the others as you have time.
You're better off with a site where 90%+ of the pages validate - either as HTML or XHTML. The browsers take them one page at a time, and you can too.
Help with Converting
- Learn to Convert HTML to XHTML - Why Switch
- How to Convert HTML to XHTML in FrontPage
- Why Should You Convert to HTML +CSS or XHTML ?
- Using Temporary Styles to Convert an HTML Document
- HTML Converters
- Using Search and Replace in FrontPage
- Using Search and Replace in Expression Web
- Global search and replace is a lifesaver
What do you recommend?
How would you convert a large site from HTML to XHTML? Would you convert it or leave it as it is? Are there tools you use to help you convert? Let us know by posting in the comments or answering the post.



Comments
I use notepad++ for my pages. In one of the menus there is an option to convert from HTML to XHTML. I find it does a really great job at this.
Since my pages are built by databases, I just have to make my template XHTML compliant so it’s a lot quicker.
I use Homesite+ to set Document as XHTML. The problem is it can convert them only one by one. But if you use a template, changing the template to XHTML all the pages linked to that template will automatically be converted.
I agree 100% with what the author of this article says about converting to XHTML. Go through each page 1 at a time. You could even set aside a page with just the correct XHTML heading and save this as a starter XHTML template of some sort. Then all you would need to do is insert the body portion into it.
Of course, you may have to make minor changes to that particular page to go with that page such as meta tags or linking a style sheet.
I feel that that a web developer needs to be proficient and changing each page one by one shows this characteristic.