Please can someone 'tidy up' my html?

Soldato
Joined
3 Dec 2004
Posts
2,639
Hi all,

Was wondering, i am very bad at html (general coding). I have created a very small html page (<20 lines) which has a table and some pictures. Was wondering if I could email it to someone who could have a quick look and see if it could be 'optimized/tidied up a bit better?

Any help appricated,

Thanks
 
Thanks for suggestions guys.

Sometimes the template does not always center (dont know if I have the 'center' in right place). Would really appricate if you could give it a tidy and remove (if needed) any non essential code.

Here is the coding:



<center TABLE CELLSPACING="28" CELLPADDING="0" WIDTH="100%">
<TR>
<TD VALIGN="top">
<TABLE border=1>

<TR vAlign=top>
<TD colSpan=2>
<CENTER><BR><A href="Blueyonder" target=_blank><IMG alt="TopBargain" src="http://www.topbargain.pwp.blueyonder.co.uk/images/Template/Top.BargainLogo.gif" border=0></A> <BR><BR>Purchase With Confidence. <A href="http://feedback.ebay.co.uk/ws/eBayI...userid=top.bargain&amp;ssPageName=STRK:ME:UFS"><I>100% FEEDBACK.</I></A> A Trusted eBay Power Seller.<BR><BR></CENTER></TD></TR>
<TR vAlign=top>
<TD><B>Description:</B></TD>
<TD rowSpan=6><IMG height=650 alt="Picture Name" src="URL"width=300></TD></TR>
<TR vAlign=top>
<TD><BR>
<UL><B>DESCRIPTION</B></UL>
<UL>
<LI>
<li>
<LI>
<p>
<LI>
<LI>
<TR vAlign=top>
<TD><B>Postage:</B></TD></TR>
<TR vAlign=top>
<TD><BR>
<UL>
<li>Please Check Table At Bottom For Postal Rates
<P>
</U><BR><BR></FONT></P></UL></TD></TR>
<TR vAlign=top>
<TD><B>Payment Methods:</B></TD></TR>
<TR vAlign=top>
<TD><BR>
<UL><A href="TopBargain" target=_blank><IMG alt="TopBargain" src="http://www.topbargain.pwp.blueyonder.co.uk/images/Template/PaypalLogo.gif" border=0></A> </UL>
<UL>
<LI type=SQUARE><I>Money/Postal Orders and Certified Checks Accepted.</I><BR><U>All payments must be received within 5 days of purchase.</U> </LI></UL></TD></TR></TABLE>

</TD>
</TR>
</TABLE>
Thanks
 
I think you need to go through it first and sort the tags out. They need to open and close in the right place. You have some tags closing which wern't opened.
 
This is quick,

Code:
<table width="650" border="0" cellpadding="0" align="center">
  <tr>
    <td colspan="2" align="center"><A href="Blueyonder" target=_blank><IMG alt="TopBargain" src="http://www.topbargain.pwp.blueyonder.co.uk/images/Template/Top.BargainLogo.gif" border=0></A> <BR><BR>Purchase With Confidence. <A href="http://feedback.ebay.co.uk/ws/eBayISAPI.dll?ViewFeedback&amp;userid=top.bargain&amp;ssPa geName=STRK:ME:UFS"><I>100% FEEDBACK.</I></A> A Trusted eBay Power Seller.</td>
  </tr>
  <tr>
    <td><B>Description:</B></td>
    <td rowspan="2"><IMG height=650 alt="Picture Name" src="URL"width=300></td>
  </tr>
  <tr>
    <td valign="top"><br><ul>
  <li><B>Postage:</B>    
    <ul>
      <li>    Please Check Table At Bottom For Postal Rates
        <B>Payment Methods:</B></li>
      </ul>
    <blockquote>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p><A href="TopBargain" target=_blank><IMG alt="TopBargain" src="http://www.topbargain.pwp.blueyonder.co.uk/images/Template/PaypalLogo.gif" border=0></A>      </p>
    </blockquote>
    </li>
  <ul>
    <li><I>Money/Postal Orders and Certified Checks Accepted.</I></li>
    </ul>
  <p>&nbsp;</p>
  <li><U>All payments must be received within 5 days of purchase.</li>
    </ul></td>
  </tr>
</table>
 
monkeysmith said:
This is quick,

Code:
<table width="650" border="0" cellpadding="0" align="center">
  <tr>
    <td colspan="2" align="center"><A href="Blueyonder" target=_blank><IMG alt="TopBargain" src="http://www.topbargain.pwp.blueyonder.co.uk/images/Template/Top.BargainLogo.gif" border=0></A> <BR><BR>Purchase With Confidence. <A href="http://feedback.ebay.co.uk/ws/eBayISAPI.dll?ViewFeedback&amp;userid=top.bargain&amp;ssPa geName=STRK:ME:UFS"><I>100% FEEDBACK.</I></A> A Trusted eBay Power Seller.</td>
  </tr>
  <tr>
    <td><B>Description:</B></td>
    <td rowspan="2"><IMG height=650 alt="Picture Name" src="URL"width=300></td>
  </tr>
  <tr>
    <td valign="top"><br><ul>
  <li><B>Postage:</B>    
    <ul>
      <li>    Please Check Table At Bottom For Postal Rates
        <B>Payment Methods:</B></li>
      </ul>
    <blockquote>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p><A href="TopBargain" target=_blank><IMG alt="TopBargain" src="http://www.topbargain.pwp.blueyonder.co.uk/images/Template/PaypalLogo.gif" border=0></A>      </p>
    </blockquote>
    </li>
  <ul>
    <li><I>Money/Postal Orders and Certified Checks Accepted.</I></li>
    </ul>
  <p>&nbsp;</p>
  <li><U>All payments must be received within 5 days of purchase.</li>
    </ul></td>
  </tr>
</table>


Thanks very much for help, only thing is though is that I cannot see the table. The table is needed to seperate the different sections. Really appricate your help though, whenever I try to alter it I mess it right up.


Jaffa_Cake said:
What program did you write that code in?? I am worried by

Code:
<UL>
<LI>
<li>
<LI>
<p>
<LI>
<LI>


I need the '<li>' as it makes a bullet mark which I use to fill in details :)

As to who made the code, someone on the forum kindly did a template for me which I have since added lots of bits to (which is why its a bit messed). Whenever I try to 'tidy it', i end up messing it more up. I cant get the hang of html :(

Any help appricated.
 
Last edited:
monkeysmith said:
http://www.w3.org/Amaya/

Download that, paste in the code and edit like a word editor then, will be easier.


I'll give it a go - thanks for help monkeysmith :)

Only problem with those type of apps though is that thet add load of code thats not needed, as that is what I origianlly done with the template. Although i did get it to look how i wanted it, thats how it became 'messy' :(
 
Been trying to tidy the code up for over an hour now and im having now luck, i end up messing the whole lot up :( really would appricate if anyone could help.
 
Edit: nevermind.

Here it is:
Code:
<table border="1" align="center">
	<tr valign="top">
		<td colspan="2">
			<center>
				<br />
				<a href="Blueyonder" target="_blank"><img alt="TopBargain" src="http://www.topbargain.pwp.blueyonder.co.uk/images/Template/Top.BargainLogo.gif" border="0"></a>
				<br />
				<br />
				Purchase With Confidence. <a href="http://feedback.ebay.co.uk/ws/eBayISAPI.dll?ViewFeedback&amp;userid=top.bargain&amp;ssPa geName=STRK:ME:UFS"><i>100% FEEDBACK.</i></a> A Trusted eBay Power Seller.
				<br />
				<br />
			</center>
		</td>
	</tr>
	<tr valign="top">
		<td>
			<b>Description:</b>
		</td>
		<td rowspan="6">
			<img height="650" alt="Picture Name" src="URL" width="300">
		</td>
	</tr>
	<tr valign="top">
		<td>
			<br />
			<p><b>DESCRIPTION</b></p>
			<ul>
				<li>&nbsp;</li>
				<li>&nbsp;</li>
				<li>&nbsp;</li>
			</ul>
			<p>&nbsp;</p>
			<ul>
				<li>&nbsp;</li>
				<li>&nbsp;</li>
			</ul>
		</td>
	</tr>
	<tr valign="top">
		<td>
			<b>Postage:</b>
		</td>
	</tr>
	<tr valign="top">
		<td>
			<br />
			<ul>
				<li>Please Check Table At Bottom For Postal Rates</li>
			</ul>
			<p>
				<br />
				<br />
			</p>
		</td>
	</tr>
	<tr valign="top">
		<td>
			<b>Payment Methods:</b>
		</td>
	</tr>
	<tr valign="top">
		<td>
			<br />
			<p><a href="TopBargain" target="_blank"><img alt="TopBargain" src="http://www.topbargain.pwp.blueyonder.co.uk/images/Template/PaypalLogo.gif" border="0"></a></p>
			<ul>
				<li type="square">
					<i>Money/Postal Orders and Certified Checks Accepted.</i>
					<br />
					<u>All payments must be received within 5 days of purchase.</u>
				</li>
			</ul>
		</td>
	</tr>
</table>

Just a quick tip: always close tags in your HTML, and make sure you do it in the right order, unless it's something that has no content like <br> or <hr>, in which case you should add a space and slash, like so: <br />, <hr />.

Good formatting also increases clarity :)
 
Last edited:
Just some points:

<center> tag should be replaced with: style="text-align: center;" in the <td>
<img> tags should be closed by /> and not >
<b> should be replaced with <strong> ideally
<u> is deprecated for XHTML strict (it's stilly, but you need to encase the line in <span> with a style)
target="_blank" is advised against because you forcefully open it in a new window without letting the user decide
border="0" on img tags shouldn't be used, instead use: style="border-style: none;"
 
flibby said:
Just some points:

<center> tag should be replaced with: style="text-align: center;" in the <td>
<img> tags should be closed by /> and not >
<b> should be replaced with <strong> ideally
<u> is deprecated for XHTML strict (it's stilly, but you need to encase the line in <span> with a style)
target="_blank" is advised against because you forcefully open it in a new window without letting the user decide
border="0" on img tags shouldn't be used, instead use: style="border-style: none;"
If you're going to go for inline styling with style="..." then you may as well just use external CSS files instead (which is of course preferable).

Also, <center> centres block-level elements as well as in-line elements, whereas text-align: center; only centres in-line ones.
 
Back
Top Bottom