Results 1 to 5 of 5

Thread: Need to clean up (fix) my xhtml codes, help!

  1. #1
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face Need to clean up (fix) my xhtml codes, help!

    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.

    Code:
    <!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,location.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>
    Last edited by jscheuer1; 08-02-2012 at 12:24 AM. Reason: Format

  2. #2
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default

    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.

  3. #3
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Three words: find and replace
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    <!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,location.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>
    Last edited by jscheuer1; 08-31-2012 at 11:37 PM. Reason: detail
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •