Results 1 to 6 of 6

Thread: What's wrong with my Code?

  1. #1
    Junior Member
    Join Date
    May 2008
    Location
    NSW
    Posts
    27

    Default What's wrong with my Code?

    Help: I would appreciate any at all. . .

    When I Googled my site this is what came up:

    "THE IRW DIET It Really Works. MORE DIET INFORMATION JOIN MY DIET CONTACT ME ABN 67 232 ... The IRW Diet is about healthy eating. It won't leave you hungry. ..."


    I have tagged (is that the correct term??) a description into my page, and assumed it would be shown. What it is actually showing are my links in my index page.

    Is there something wrong with my code?

    <title>The IRW Diet</title>
    <meta http-equiv="New It Really Works Diet" content="A fantastic NEW diet that will drop weight fast and keep it off, I know, I did it!; text/html; charset=utf-8" /> <meta name="new, diet, irw, weight, fat, loss, fat loss, lose fat, detox, detox diet, lose weight, new diet, irw diet" />
    <link rel="stylesheet" href="mm_lodging1.css" type="text/css" />
    and
    <meta name="Keywords" content="IRW Diet, diet, lose weight, free, fat, it really works, exercise, new, food, low carb" />
    <meta name="Description" content="The IRW Diet is a new easy to follow diet with no weighing or counting calories. It is about healthy eating the whole family can enjoy.
    Six meals a day is the answer to keeping hunger pains at bay!" />


    Regards Jo

  2. #2
    Senior Member
    Join Date
    Dec 2007
    Posts
    246

    Default

    I think Google tends to index your site content rather than your meta tags.. whereas some other search engines index your meta tags.

    So if you want that text to be shown maybe try having it at the top of your front page so Google's spiders index it.

    Hope that helps!

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Location
    Mauritius/Perth
    Posts
    14

    Default

    Jo,

    When I search with Google I get the first few lines of the content, with Yahoo I get (different) text from the content as well.

    Google generally takes the SERP description from your description meta tag but if it doesn't have one then it takes it from the content that contains the keywords searched. I'm wondering if Google is not recognising your meta description and so is using the content.

    Your description format looks OK but there are a couple of small things that I would change to see if that makes a difference. Not big things and I'm not sure if that's the cause but give it a shot.

    Uncapitalise Keywords and Description in the tags - they should always be lower case. Move your CSS under the meta tags.

    A last thought - how long ago did you add the meta tags? Google takes times to index websites and maybe the last time it did was before the tags were there.

  4. #4
    Junior Member
    Join Date
    Jun 2008
    Location
    Mauritius/Perth
    Posts
    14

    Default

    One more thing, I just ran a validation check and the home page doesn't validate. The search engines don't like non-validating code so you'll need to correct that.

    Go to The W3C Markup Validation Service and plug in your URL. There's quite a few errors but don't stress too much, one error in your code usually results in several validation errors.

  5. #5
    Junior Member
    Join Date
    May 2008
    Location
    NSW
    Posts
    27

    Default

    Thanks Slade and Intergise.

    Yes there are alot of errors that come up and it all seems to be in the encoding that I pasted from PayPal.

    For example:
    Line 131, Column 80: there is no attribute "bordercolor".
    …ding="0" cellspacing="0" bordercolor="#000000">
    It seems to run through my PAYPAL coding with these red highlights, which I assumed were missing.I have looked at the coding and the " is definately there.

    Also, what does this mean. Is it to do with my CSS: (I will move it up as you suggested.)

    No Character Encoding Found! Falling back to UTF-8.None of the standards sources gave any information on the character encoding labeling for this document. Without encoding information it is impossible to reliably validate the document. As a fallback solution, the "UTF-8" encoding was used to read the content and attempt to perform the validation, but this is likely to fail for all non-trivial documents.

    Read the FAQ entry on character encoding for more details and pointers on how to fix this problem with your document.
    Regards Jo

  6. #6
    Junior Member
    Join Date
    Jun 2008
    Location
    Mauritius/Perth
    Posts
    14

    Default

    Jo,

    A lot of the errors are due to not closing the tags correctly. Enclosing tags, like <p> should look like this:
    HTML Code:
    <p>text</p> not <p>text<p>
    Non-enclusing tags like input and img should look like this:
    HTML Code:
    <input type="hidden" name="lc" value="AU" />
    A lot of the rest are due to incorrect attributes. It would be better to replace these with CSS. That will eliminate these errors and make the site a lot easier to maintain going forward. Try and use an external stylesheet so it's all in one place rather than throughout every page.

    Character encoding is for text in computers. Each character is represented by a code and the computer needs to know what system is being used. Just add the following just under the <head> tag:
    HTML Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

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
  •