I have some wierd mark up showing on my site "" ?

10 replies
  • WEB DESIGN
  • |
Can anyone tell me what is causing this markup, it only seems to show up in mozilla firefox, not Opera, Google Chrome or IE8.

Its in the top left corner of the page on firefox.

Anyhelp wwould be great.

I also realized that for the past year I have had no DOCTYPE clamied, any idea on the best DOCTYPE to claim the site as?

Somehow with no DOCTYPE I still have made it to Google PR1.
# #mark #showing #site #wierd
  • Profile picture of the author KirkMcD
    Is this on your sites?
    If so, you have some extra characters at the begining of the page that you can't see, delete them.
    First, you don't need a doctype.
    Second, the doctype is based on the HTML version you are using. So you don't just pick one at random. You have to choose the correct one or the page may not render properly.
    {{ DiscussionBoard.errors[2189241].message }}
    • Profile picture of the author Steve Wells
      Originally Posted by KirkMcD View Post

      Is this on your sites?
      If so, you have some extra characters at the begining of the page that you can't see, delete them.
      First, you don't need a doctype.
      Second, the doctype is based on the HTML version you are using. So you don't just pick one at random. You have to choose the correct one or the page may not render properly.
      If I cant see them then How can I delete them?
      Signature
      Need Custom Graphics Work? - Message Me For A Design Quote!
      {{ DiscussionBoard.errors[2189385].message }}
      • Profile picture of the author KirkMcD
        Originally Posted by EWGQDD View Post

        If I cant see them then How can I delete them?
        That's the trick.

        They usually show up in a text editor as blanks.
        {{ DiscussionBoard.errors[2190974].message }}
        • Profile picture of the author Steve Wells
          Originally Posted by KirkMcD View Post

          That's the trick.

          They usually show up in a text editor as blanks.
          So, are you trying to help me, or just letting me know that you know how to get rid of it but I have got to figure it out? :confused:
          Signature
          Need Custom Graphics Work? - Message Me For A Design Quote!
          {{ DiscussionBoard.errors[2191175].message }}
  • Profile picture of the author BobJutsu
    Thats the byte order mark.

    Your text editor is saving the files in utf-8 with the BOM. Either change the charset that your text editor is saving in to iso-8859-1, or change the charset deceleration of your website to utf-8. You have a mismatch, that is the problem.

    Originally Posted by KirkMcD View Post

    Is this on your sites?
    If so, you have some extra characters at the begining of the page that you can't see, delete them.
    First, you don't need a doctype.
    Second, the doctype is based on the HTML version you are using. So you don't just pick one at random. You have to choose the correct one or the page may not render properly.
    Bad advice all around. Don't listen to this...shame. There are no extra characters, that is why you don't see them. It is a mix-up in the charset the file is being saved as, and the charset it is being rendered as.

    Secondly, you do need a doctype if you want anything to render in any predictable manner. Very few things render consistently or reliably across browsers without an accurate doctype. I don't know what site you are referring to, but the doctype will depend on the markup. Or, more accurately, the markup should depend on the doctype.

    There is no shame in using an html 4.01 doctype if that is how you are writing your markup, but there is no reason to write your markup in an 11 year old standard either. Just good coding practices such as properly nesting tags, lowercase markup, lean code, proper semantics, and using up-to-date tags will normally validate as xhtml strict anyway, with the added perk of being extensible...it doesn't take much to get in the habit of best coding practices so don't be afraid to try...standards exist for a reason.
    {{ DiscussionBoard.errors[2192166].message }}
    • Profile picture of the author Steve Wells
      Originally Posted by BobJutsu View Post

      Thats the byte order mark.

      Your text editor is saving the files in utf-8 with the BOM. Either change the charset that your text editor is saving in to iso-8859-1, or change the charset deceleration of your website to utf-8. You have a mismatch, that is the problem.



      Bad advice all around. Don't listen to this...shame. There are no extra characters, that is why you don't see them. It is a mix-up in the charset the file is being saved as, and the charset it is being rendered as.

      Secondly, you do need a doctype if you want anything to render in any predictable manner. Very few things render consistently or reliably across browsers without an accurate doctype. I don't know what site you are referring to, but the doctype will depend on the markup. Or, more accurately, the markup should depend on the doctype.

      There is no shame in using an html 4.01 doctype if that is how you are writing your markup, but there is no reason to write your markup in an 11 year old standard either. Just good coding practices such as properly nesting tags, lowercase markup, lean code, proper semantics, and using up-to-date tags will normally validate as xhtml strict anyway, with the added perk of being extensible...it doesn't take much to get in the habit of best coding practices so don't be afraid to try...standards exist for a reason.
      Here is the site, The Site any suggestions on what Doctype and Charset would work well with it do get rid of the extra characters that only show up on Firefox.

      Thanks, for some genuine help.
      Signature
      Need Custom Graphics Work? - Message Me For A Design Quote!
      {{ DiscussionBoard.errors[2193619].message }}
  • Profile picture of the author JonathanKrantz
    This is a byte-order mark.

    Make sure you save your documents in UTF-8 without BOM.

    To do this I suggest using notepad++.
    {{ DiscussionBoard.errors[2192694].message }}
  • Profile picture of the author JonathanKrantz
    It is not in the doctype. The only thing you should do is open your index.html in notepad++ or some other editor that supports saving in different encoding and click the menu Encoding and select "Convert to UTF-8 without BOM". Click Save and then reupload the file to your hosting.
    {{ DiscussionBoard.errors[2193637].message }}
  • Profile picture of the author Janet Sawyer
    Your site does show those in Firefox and not in ie. - but the source code is different in both too.
    In Firefox the characters are there before the opening <html> tag.
    In I.E. the characters are not there, but ther is a 1 showing after the closing </html> tag.
    As others have suggested, download your self a copy of notepad++ (it's free)
    Edit the source code of the page, remove the offending characters, make sure that there are no spare lines after the </html> tag.
    Save the page then as the correct doc type (see post above) and it should all be fixed for you.
    {{ DiscussionBoard.errors[2193829].message }}
  • Profile picture of the author BobJutsu
    Just use the html 4.01 transitional (for now)...it has the fewest errors (still has a lot though). Spend a little time fixing the error and making the markup semantically correct, it doesn't have to be a big thing. Just spend, say, 15 minutes here and there and fix half a dozen of the errors listed, and before you know it you will have a perfectly validating page with correct doctype.

    Better yet, run it through htmltidy once first, a lot of the errors are little syntax things, so that will more than likely make a heavy dent in your validation duties. As far as the BOM goes, enough people have told you how to fix it, so there is no need for me to rehash.
    {{ DiscussionBoard.errors[2196120].message }}

Trending Topics