Results 1 to 10 of 10

Thread: What is the best way to clean up html

  1. #1
    Join Date
    Apr 2007
    Location
    LA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What is the best way to clean up html

    My pages have a lot of junk from the years of changes. hand editing them all would take months.

    Any ideas?

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

    Default

    Use a content management system-- you must 'hand edit' them to do this, but after that you can do it much more easily.
    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

  3. #3
    Join Date
    Dec 2010
    Location
    Laurens, SC
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Could you say a little more about how that works in the long run? What about a content management system would be helpful after the code is hand editted? I always thought of content management as being for sites where many people had some access to a site to make changes..how would it help with the editing process..

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

    Default

    A CMS, whether used by one or many users, is designed to edit content not code. The code is consistent throughout the site while the content is changed manually. This means everything is more efficient. Of course it's less efficient to setup, but if it is used on enough pages it makes up for the time quickly.

    A CMS can be either a system like word press or joomla that you install on your site or something you build yourself using databases and a serverside language like PHP.


    If you want more help, please ask more specific questions and give us details to work with. For general topics like this, there is also a lot of information available on google and wikipedia.

    Based on the first question in this thread, I'm not sure exactly what is being 'cleaned up', but a content management system should help.

    Another way to approach it would be to use templates, but CMS and templates are basically the same thing, at a technical level.
    Last edited by djr33; 12-18-2010 at 07:45 PM.
    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

  5. #5
    Join Date
    Dec 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Dreamweaver has a "clean up word HTML" option. Granted, I know it isn't perfect, but it also the only thing I have worked with.
    Last edited by djr33; 12-20-2010 at 05:09 AM. Reason: Signature links removed.

  6. #6
    Join Date
    Dec 2010
    Location
    Hyderabad, India
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I think he means cleaning up "Syntaxically", if that is a word at all.
    Try doing this. Be brave, do it once yourself, align them by using tabs for interior elements, breaks for block level elements etc.

    Much better solution is, if you are a web programmer too, use Server Side Includes to modularize your sections of the website.

    Example in PHP..

    Code:
    <body>
    <?php require_once( 'includes/header.php' ); ?>
    <?php require_once( 'includes/middle.php' ); ?>
    <?php require_once( 'includes/footer.php' ); ?>
    </body>
    This is a general example. It is upto you to build on it and make it cleaner.

  7. #7
    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

    HTML Tidy:

    http://tidy.sourceforge.net/

    Be forewarned though. Back up your pages first. If they are very messy and/or not to standards, HTML Tidy will break them. But you should be able to go back and fix them.

    Another approach would be to validate your HTML first:

    http://validator.w3.org/

    That way HTML Tidy will be less likely to break the page when it cleans it up. The validator also has an option:

    Clean up Markup with HTML Tidy
    Which you can choose after hitting the "More Options" link.

    As I say though, before doing any of this - Back up your pages first.
    Last edited by jscheuer1; 01-04-2011 at 06:37 AM. Reason: add detail
    - John
    ________________________

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

  8. #8
    Join Date
    Jan 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I hand't heard about HTML Tidy until now. And I am sure it can't work as weel as manul edit.

  9. #9
    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

    Quote Originally Posted by nextdownload View Post
    I hand't heard about HTML Tidy until now. And I am sure it can't work as weel as manul edit.
    If you write your code to standards though, it should actually be much easier than manually editing each page.
    - John
    ________________________

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

  10. #10
    Join Date
    Mar 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cleanup HTML

    Try Cleanup HTML on-line tool to clean HTML code

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
  •