Clean up my code

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Clean up my code

Post by kastnerd » Wed Apr 29, 2009 8:05 am

I have my old php/html site. With lots of instructions with tables and fonts and sizes.

I would like to clean up the code so its uses the styles correctly.

I have Dreamweaver CS3.

Anyone have suggestions on how to cleanup my code? Here is a sample of my ugly code.

Code: Select all

 <table>

	  <tr>
	  <td>
	  <font face="verdana" size="3"><b>
	  Detailed Installation Instructions
	  <br>
	  <br>
	  </b></font>	  </td>
	  </tr>
	  
	  <tr>

	  <td>
<TABLE BORDER=0 WIDTH="100%">
   <TR>
      <TD>         
	  <b><font color="red"><span class="style3">*Recommended</span>:</font><a href="/movieinstall.php"><FONT FACE="Arial" size="2"> Watch The Installation Instruction Movie</font></a></b>
         
	  <p class="style3"><span class="style4">What do I need before starting?</span><br>
             - Floor pump / Air compressor. (do not use mini pumps or C02 to inflate!)<br>

             - Plastic tire lever. (do not use screwdrivers, metal tire levers, or sharp tools!)<br>
             - Soap & water solution: Use a small bucket and mix 1/4 cup of liquid dish soap to 2 cups of water.<br>
             - Large brush with soft bristle to apply the soap & water solution.<br>
             - Cardboard box with open top or bucket. This is used in the sealing process (<strong>Photos 9, 10</strong>).<br>
             - Hand drill, 3/8" or 7/16" drill bit, small hand file for de-burring.<br><br>

             <span class="style4">1: Enlarging Valve Stem Hole</span><span class="style4">
			 <br>


kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Clean up my code

Post by kastnerd » Wed Apr 29, 2009 10:25 am

That did not remove much.
It still left me with

Code: Select all

<font face="verdana" size="3">
and

Code: Select all

<p class="style3">
I saw this post on another site that uses some sort of stripier. http://www.telerik.com/community/forums ... -html.aspx

I found if i take it in dreamwaver and select all and pick "none" for the format/front/style/size it removes basically everything.

Anyone have a quicker way to remove this?

mwolf
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 50
Joined: Mon Jul 02, 2007 9:37 pm
Location: Chicago, IL
Contact:

Re: Clean up my code

Post by mwolf » Wed Apr 29, 2009 10:30 am

You could run your code through a HTML validation. This wont fix your code, but it will give you tips on how to clean it up.

http://validator.w3.org/#validate_by_input

Copy & Paste your code in the textarea, click more options and select your Doctype.

Post Reply