Help ----- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Les Grossman
    So Fucking Banned
    • Sep 2009
    • 1012

    #1

    Help ----- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    When I validate my site, it is saying the trailing "/" at the end is invalid and shouldn't be there. However, all I see is code with this.

    Can some code experts chime in here, I'm a little confused.

    "The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML. "
  • JamesK
    hi
    • Jun 2002
    • 16731

    #2
    You need to specify the doctype. Add this to the top of your page:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    M3Server - NATS Hosting

    Comment

    • Nookster
      Confirmed IT Professional
      • Nov 2005
      • 3744

      #3
      Maybe because it's missing a space before the trailing slash?
      Code:
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      And yea of course you need to specify a doctype. Trailing slash is only required with xhtml versions.
      Last edited by Nookster; 11-25-2009, 06:42 AM.
      The Best Affiliate Software, Ever.

      Comment

      • JamesK
        hi
        • Jun 2002
        • 16731

        #4
        GFY timed out. Anyway, replace the HTML tag with this too:

        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

        More info here:

        http://www.w3.org/QA/2002/04/valid-dtd-list.html
        M3Server - NATS Hosting

        Comment

        • Les Grossman
          So Fucking Banned
          • Sep 2009
          • 1012

          #5
          Thanks guys, I'll give that a try.

          Comment

          Working...