Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
photo of Jennifer Kyrnin

Jennifer's Web Design / HTML Blog

By Jennifer Kyrnin, About.com Guide to Web Design / HTML since 1997

Reader Question: Converting a large site from HTML to XHTML

Friday August 22, 2008

Question?
RomaHOST asks:

  1. 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);
  2. 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

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

August 23, 2008 at 7:51 am
(1) James says:

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.

August 24, 2008 at 4:26 am
(2) Iosi says:

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.

August 24, 2008 at 8:21 am
(3) Timmy Gibson says:

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.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Discuss

Community Forum

Explore Web Design / HTML

About.com Special Features

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.