Forum Moderators: open

Message Too Old, No Replies

Cleanup bloated html?

         

mtzheng

4:53 am on Jul 10, 2005 (gmt 0)

10+ Year Member



i designed a standard template(table) for the restaurant menu. so i scan the menu, and formulate tables in MS-word. i save it as web file, but the html code goes with the file looks huge and full of useless junks. I hate it so much, because i hand-code every webpages in my site, and they are really "clean". i know i can use Html tidy to clean it up.

[w3.org...]
[tidy.sourceforge.net...]

but they runs in command prompt only, which makes it really hard to use. A recommendation of tidy tutorial will be appreciated.

did anyone scan any tabular data and make them into webpages?

Is there another way to bypass Ms-word that i use to make tables for input menu? Btw i am using DW for the menu template, i can't insert the data into my menu template unless i make them into tables first in MS-word. Please share your experience with me.

Thanx a million times. :)

martinibuster

5:26 am on Jul 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



DW has a function for de-wording html files.
Command > Clean Up Word HTML

I also recommend downloading HTMLkit and using that to find more html errors, as I bet it will find stuff DW left behind. Let the app suggest the changes then change it by eye line by line. Never run it in Auto mode.

Good luck.

tedster

5:49 am on Jul 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've converted a good number of Word tables to html tables. There are a few very handy tools built into Word that I use:

1. Under the table menu, I use convert table to text. I prefer using paragraph breaks because commas in the text itself get confused if I also use comma separators.

2. Use Word's 'find and replace' to put in html strings in the appropariate spots, like </td></tr><tr><td> and so on

3. Using some of the advanced functions in Word (especially ^p to find/replace paragraph breaks) makes this job work out.

4. Save as text - then close the file and re-open it before doing the copy/paste into my html file.

These features allow me the kind of hands-on control I want for my html files. It's far from automated, but I don't trust automated.

mtzheng

1:52 pm on Jul 10, 2005 (gmt 0)

10+ Year Member



thank you, martinibuster and tedster.
really appreciate it. i just found out that HTMLkit is a really cool and useful tool, i will play with it for a while to solve my problem.

well, i am more or less looking for an automated method to make things work. i have at least 50 menus to go. so this sum up to one problem, that is how to copy and paste the tablular data into preformated tables(my template) without copying the attributes or properties come with them. my template is assoicated with an external css file.

so when i do the copy and paste, i paste the data into tables in design view(DW).

i need the the table structure to stay the same like following:


<table id="foodid">
<colgroup>
<col class="c1" /><col class="c2" />
<col class="c3" /><col class="c4" />
</colgroup>
<tr>
<td>field1</td>
<td>field2</td>
<td>field3</td>
<td>field4</td>
</tr>
....
....
....
</table>

regards