Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] a puzzled question about the doctype of yui!!

Expand Messages
  • Matt Warden
    ... Hash: SHA1 ... If you re talking about the CSS files in YUI, you can use XHTML, but it should be the strict doctype. The transitional doctype will not work
    Message 1 of 2 , May 29 9:24 PM
    • 0 Attachment
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      wrote:
      > dear all!
      > i got a question,
      > why yui use html doctype like this
      >
      > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 2 "http://www.w3.org/TR/html4/strict.dtd">
      >
      > but i think html4 is not as new as the webstandard ,so can i use my doctype like
      >
      > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      > <html xmlns="http://www.w3.org/1999/xhtml">

      If you're talking about the CSS files in YUI, you can use XHTML, but it
      should be the strict doctype. The transitional doctype will not work as
      well cross-browser. This is because transitional triggers standards mode
      in fewer browsers (although I don't think this is the case in any of
      the browsers listed here:
      http://developer.yahoo.com/yui/articles/gbs/gbs_browser-chart.html I
      believe it xhtml trans only kicks Konq into quirks mode, but I could be
      wrong).

      Anyway, I would suggest using the strict doctype:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



      - --
      Matt Warden
      Oxford, OH, USA
      http://mattwarden.com


      This email proudly and graciously contributes to entropy.
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.4.1 (GNU/Linux)
      Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

      iD8DBQFEe8kQrI3LObhzHRMRAju1AKDDX8idksnbkS8Uf03U6Wuhr3OmhgCcCbE5
      TSEYrUcb7d6lwo0tmmwotJI=
      =NAzc
      -----END PGP SIGNATURE-----
    Your message has been successfully submitted and would be delivered to recipients shortly.