PDA

View Full Version : Need to clean up (fix) my xhtml codes, help!



TinaBina
08-01-2012, 07:19 PM
I am having some issues with validating my home page which is on my computer and a work in progress. Here is the complete code, any help would be deeply appreciated. In trying to switch from tables to div tags I think I ended up with a little bit of both and don't have any idea how to fix it.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>correctedhomepage.html</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
<meta name="Generator" content="Alleycode HTML Editor" />
<meta name="Description" content="Your description here..." />
<meta name="Keywords" content="Your keywords here..." />
<link rel="stylesheet" href="/include/easy.css" type="text/css" />
</head>
<body>
<div id="centernavigation">
<div class="tableborder" width="80%" cellspacing="0" cellpadding="0" align="right">
<table>
<tr>
<td>
<div width="90%" cellspacing="0" cellpadding="0" align="center">
<br />
<br />
<br />
<a href="javascript:if(document.all)window.external.AddFavorite(location.href,document.title);%20else%20if(window.sidebar)window.sidebar.addPanel%20(document.title,locat ion.href,'');">
<font color="blue">Bookmark this page</font></a><br />
<br />
<br />
<div align="right"></div>
<div width="90%" cellspacing="0" cellpadding="0" align="center">
</div>
<div width="80%" cellspacing="0" cellpadding="0" align="center">
</div>
<br />
<br />
<br />
<br />
<p style="text-align:center">I Can Do That is a small business
created out of my love for computers (and everything made
possible with them) run out of my home. The possibilities are
endless, if you can think of it, I have either done it or will
try to do it. Many of the items on our price list have been
developed from customers asking me "Can you do". To name a few,
photo posters 13x19", photo packages made to order, photo taking
(although I am not a professional), photo playing cards with a
photo on every card, DVD videos of your children-wedding-birthday
party etc., with the music of your choice added for effect
(please note if the song has a copyright we would need to get
permission from the owner to use it), transferring of your old
VCR tapes to DVD's. There are too many to list here but take a
minute and look at the list to see if there is anything you might
be interested in or just take a tour through our web-site.</p>
<p style="text-align:center"><b><font color="purple">For all the
happenings in your life! I Can Do That</font></b></p>
<table>
<tr>
<td></td>
</tr>
<tr>
<td width="40%" align="left"><img align="left" src="image001.gif"
alt="image001" height="500" width="400" /></td>
</tr>
<tr>
<td>
<ul>
<li><b><a href="correctedhomepage.html"><font color="darkviolet">Home</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedphotosandenhancements.html"><font color="darkviolet">Photos and Enhancements</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedprojectlist.html"><font color="darkviolet">Project List</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedpricelist.html"><font color="darkviolet">Price List</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedorderform.html"><font color="darkviolet">Order Form</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedcontactpage.html"><font color="darkviolet">Contact Page</font></a></b></li>
<li style="list-style: none"><br /></li>
</ul>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

marain
08-30-2012, 11:42 PM
Tina,

Might I suggest you try running your html through the w3c validator, http://validator.w3.org/check?uri=referer. That will tell you which lines are causing you problems, and offer suggestions on how to fix them.

Best,

A.

bernie1227
08-31-2012, 08:40 AM
Three words: find and replace

jscheuer1
08-31-2012, 03:16 PM
You don't say whether or not you're also having problems with the rendering of the page. Let us know. But either way, this is a valid XHTML transitional version of what you posted:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>correctedhomepage.html</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
<meta name="Generator" content="Alleycode HTML Editor" />
<meta name="Description" content="Your description here..." />
<meta name="Keywords" content="Your keywords here..." />
<link rel="stylesheet" href="/include/easy.css" type="text/css" />
</head>
<body>
<div id="centernavigation">
<div class="tableborder" style="width: 80%;" align="right">
<table>
<tr>
<td>
<div style="width: 90%;" align="center">
<br />
<br />
<br />
<a href="javascript:if(document.all)window.external.AddFavorite(location.href,document.title);%20else%20if(window.sidebar)window.sidebar.addPanel%20(document.title,locat ion.href,'');">
<font color="blue">Bookmark this page</font></a><br />
<br />
<br />
<div align="right"></div>
<div style="width: 90%;" align="center">
</div>
<div style="width: 80%;" align="center">
</div>
<br />
<br />
<br />
<br />
<p style="text-align:center">I Can Do That is a small business
created out of my love for computers (and everything made
possible with them) run out of my home. The possibilities are
endless, if you can think of it, I have either done it or will
try to do it. Many of the items on our price list have been
developed from customers asking me "Can you do". To name a few,
photo posters 13x19", photo packages made to order, photo taking
(although I am not a professional), photo playing cards with a
photo on every card, DVD videos of your children-wedding-birthday
party etc., with the music of your choice added for effect
(please note if the song has a copyright we would need to get
permission from the owner to use it), transferring of your old
VCR tapes to DVD's. There are too many to list here but take a
minute and look at the list to see if there is anything you might
be interested in or just take a tour through our web-site.</p>
<p style="text-align:center"><b><font color="purple">For all the
happenings in your life! I Can Do That</font></b></p>
<table>
<tr>
<td></td>
</tr>
<tr>
<td width="40%" align="left"><img align="left" src="image001.gif"
alt="image001" height="500" width="400" /></td>
</tr>
<tr>
<td>
<ul>
<li><b><a href="correctedhomepage.html"><font color="darkviolet">Home</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedphotosandenhancements.html"><font color="darkviolet">Photos and Enhancements</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedprojectlist.html"><font color="darkviolet">Project List</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedpricelist.html"><font color="darkviolet">Price List</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedorderform.html"><font color="darkviolet">Order Form</font></a></b></li>
<li style="list-style: none"><br />
<br /></li>
</ul>
<ul>
<li><b><a href="correctedcontactpage.html"><font color="darkviolet">Contact Page</font></a></b></li>
<li style="list-style: none"><br /></li>
</ul>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

djr33
08-31-2012, 03:53 PM
Just as a general suggestion, learning to use CSS rather than inline formatting would make your code a lot cleaner and easier to deal with in general, including making the HTML valid. When the code is more organized, there are fewer problems overall, and CSS is a great way to separate out content from design.