left align code....get rid of unwanted spacing

G

Guest

I have some websites that i would like to load faster. When making a site w/
FP2003 the code is like this:

<tr>
<td colspan="3" height=1 bgcolor=#e5693b><img src="img/s.gif" width="1"
height="1" border="0"></td>
</tr>
<tr>
<td width=1 bgcolor=#e5693b><img src="img/s.gif" width="1" height="1"
border="0"></td>
<td>
<table width="724" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" colspan="3">
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td><a href="index.phtml"><img src="menu/vllogo.jpg" width="238"
height="80" border="0"></a></td>
<td><a href="index.phtml"><img src="menu/head.gif" width="509"
height="80" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>

I want to be like this:

<tr>
<td colspan="3" height=1 bgcolor=#e5693b><img src="img/s.gif" width="1"
height="1" border="0"></td>
</tr>
<tr>
<td width=1 bgcolor=#e5693b><img src="img/s.gif" width="1" height="1"
border="0"></td>
<td>
<table width="724" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" colspan="3">
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td><a href="index.phtml"><img src="menu/vllogo.jpg" width="238" height="80"
border="0"></a></td>
<td><a href="index.phtml"><img src="menu/head.gif" width="509" height="80"
border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>

is there a tool that frontpage has so i do not have to manually remove all
the extra spacing.

Thanks
 
S

Steve Easton

On the FrontPage toolbar, Tools > Page Options then click the Code Formatting tab and set Tab size
and Indent to 0. ( Zero )

That said, it's not really going to make your pages load faster. Code formatting is really there
just to make the html easier to read ( for us humans ) in Code view.

A computer sees the html as one long string ( or line ) that goes from left to right.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
G

Guest

hey steve thanks,, however that did not move my code to the left and get the
unwanted spaces, but it was a good idea :) You pages will load faster
because it is less code that has to be read. I will not matter much for the
broadband guys but it helps a little with the 56kers. Do a speedtest before
and after. You will shave a few tens of a sec off your load time.
 
S

Steve Easton

After you change the settings, you have to switch to code view, right click and select "Reformat
HTML."

As for the difference in download time, It's barely perceptible.

You're much better off spending the time making sure the html is "valid' with a validator.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top