Converting my site from HTML to XHTML/CSS

Discussion in 'HTML & Website Design' started by crb187, Dec 18, 2008.

  1. #1
    I ahve been told that my site would benefit from being comverted from HTML to XHTML with separated css files, mainly because it would tidy the code, make file sizes smaller and optimize the site for crawlers.

    Does anyone know of any good ways to do this, other than paying someone, which i'm sure would be very expensive. I known you can easily automate conversion to XHTML from HTML but what about the .css files?

    Any help appreciated. :)
     
    crb187, Dec 18, 2008 IP
  2. Yesideez

    Yesideez Peon

    Messages:
    196
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    How big is your site? Number of pages?

    I don't know if there are any tools that do this for you but doing this by hand to many pages can take a little time.
     
    Yesideez, Dec 18, 2008 IP
  3. crb187

    crb187 Active Member

    Messages:
    113
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    Link in in sig. About 45 pages probably.
     
    crb187, Dec 18, 2008 IP
  4. Jason Clay

    Jason Clay Active Member

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    91
    #4
    I would recommend that you use htmltidy for the HTML to XHTML conversion. I need to think more about the CSS.
     
    Jason Clay, Dec 18, 2008 IP
  5. Yesideez

    Yesideez Peon

    Messages:
    196
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I had a look at the source for the home page.

    Quite a bit of CSS there (noticed two chunks) with some Javascript as well.

    The CSS could all go into one file (.css) and the Javascript routines would also have to go into a separate file (.js) as anything validating Javascript in XHTML pages would through up errors with every line of Javascript.

    I noticed they're all .html files - are they or have you used something else and used a mod_rewrite? If you have to edit the menu do you edit the menu on every page?

    If yes, switching it all to PHP would make your life a lot easier. For example, page header in one file (header.php) footer in one file (footer.php) menu in one file (menu.php) and you could just include them all into the pages. Just the same when the CSS is in its own file and included into each page you'd only have to change the CSS in that one file and every page would change.

    I also noticed your contact page is relying on zookoda - ever thought of having someone write you a contact form? I can write one for you no charge.
     
    Yesideez, Dec 18, 2008 IP