SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    <?xml-stylesheet versus <link rel="stylesheet"

    I was wondering about this and can't find a real answer. Assuming I had an actual need to use XHTML, it seems the way to include stylesheets would be to use <?xml-stylesheet type="text/css" href="file.css" media="whatever"?>. Does this mean using <link rel="stylesheet"... is wrong? Or just "less XML-ish"? Are there any drawbacks to using <link> over <?xml-stylesheet?> when really using XHTML?

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Raffles View Post
    Does this mean using <link rel="stylesheet"... is wrong?
    No.

    Quote Originally Posted by Raffles View Post
    Or just "less XML-ish"?
    Yes.

    Quote Originally Posted by Raffles View Post
    Are there any drawbacks to using <link> over <?xml-stylesheet?> when really using XHTML?
    An XML-only user agent (without explicit support for XHTML) would possibly honour <?xml-stylesheet?>, but probably not <link/>.
    Nothing to really worry about, in other words.

    If you're really using XHTML I think it makes more sense to use a PI, but both methods will work.
    Birnam wood is come to Dunsinane

  3. #3
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the clarification.


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
  •