meta charset

Discussion in 'Programming' started by jeanm, Dec 16, 2016.

to remove all ads.
  1. jeanm

    jeanm Member

    Messages:
    148
    In order to define charset for DTD XHTML 1.0 Transitional which notation should I use please:

    <meta charset="UTF-8" /> or

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

    Thanks in advance, Jean
     
  2. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,461
    Given the information in your post, ... ... The answer is ... Yes!

    Because which form to use depends on on the way the document is to be used not the document type.
     
  3. jeanm

    jeanm Member

    Messages:
    148
  4. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,461
    Might do, might not.
    What does that tell us about;
    ??
     
  5. jeanm

    jeanm Member

    Messages:
    148
  6. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,461
    Okay I tried to avoid the 'technical term' of 'content disposition' which basically means "How is the content being disseminated/delivered to user agents..

    meta http-equiv directives are for when the document meta data is being or has to be delivered in the form of HTTP headers.

    However there are two solutions:

    !; Use both and let the user agent choose which to apply.

    2; Don't use the "old" format of XHTML. Use the current standard of HTML 5.

    Also: "Transitional" document declarations are used to tell the 'consuming' UA that the document content does NOT necessarily conform 'strictly' to the defined DTD as the 'provider' is transitioning from one DTD to another. So, using solution 1 with a 'Transitional' form of DTD IS correct.

    In essence you are using the idea of a DTD incorrectly. A DTD does NOT define the coding you use. It is actually the EXACT opposite. ... In that it is your coding that determines what DTD you should use.
     
  7. jeanm

    jeanm Member

    Messages:
    148
    Thanks very much. I shall try to get my head around that info. Most appreciated.
     

Share This Page