Forum Moderators: phranque

Message Too Old, No Replies

Convert old html to new ?

         

mike2010

6:11 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



A lot of my sites I started many years ago through pure html. Which use a lot of the following HTML codes -


<br>
<center>
<table>
<p>
<font>
<a href=""></a>
<b>

It seems like everybody is using these <div> tags these days. Is there a program out there that can convert my site's code to something a little more modern day ?

mike

piatkow

9:28 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I know that center and font are deprecated, I think b is too but I have never actually checked.
You can fix those with the normal find and replace in your editor.

The rest are still standard html and don't require attention.

mike2010

10:09 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



yea, but isnt there a program that can do it all in one step ? Like these web design software's. I've got ALOT of pages to do.

g1smd

11:07 pm on Jan 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Do you really need DIV tags?

I would start by eliminating all FONT tags and using CSS instead.

At the same time, BR and CENTER would also go away, with the margins, padding and position controlled by CSS.

Make sure that all content is within a box, whether that be a heading, paragraph, list, table, or form. You'll only need the odd DIV here and there.

Wlauzon

5:19 am on Jan 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Expression Web, and I think the latest Dreamweaver, has an option to just reformat code to XHTML standards. It will not remove the old tags however, just gives warnings that it is deprecated.

kaled

9:56 am on Jan 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It might be possible to devise a series of complex regular expressions that can do the job (with a replace tool). However, I think it is unlikely you will find a resource on the web with the expressions ready-made (but it's probably worth looking).

Kaled.

pageoneresults

11:31 am on Jan 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is there a program out there that can convert my site's code to something a little more modern day?

Ya, there are some "human" programs out there that may be able to do this. You open the old page, select all, copy, paste into Notepad, select all, copy and then paste into the new page with proper HTML specs. From there you use the styling menu to apply look and feel to the page and viola, you are done. It is a pretty painless process. In most instances, you'll find it worth the time as you may see things you didn't know were there. You might even have some more ideas to expand that content. I don't want to get you too excited about that prospect though. ;)

I've got ALOT of pages to do.

Templates and database, you'll want to give that serious consideration.

g1smd

7:05 pm on Jan 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



"W3C HTML Tidy" might do a few useful things, or might make a right mess of it. Keep a backup of the entire site before you start - preferably on read-only media.