Arancaytar wrote:
I have so far seen two methods for including external resources as CSS
stylesheets in a document.
There's also this, but it's obscure and unsupported.
http://www.w3.org/TR/html4/present/styles.html#h-14.6
What is the difference?
They're both valid ways of doing something that arise from completely
different parts of the spec. It's just duplication.
I use <link rel="stylesheet" and I suggest that you do the same. It
works.
It's also impossible to construct a strong argument against the other,
so I won't even bother.
I don't use media attributes to control the stylesheets because it's
ages since I needed to do this. All I ever is some trival print-only /
no-print control and I can do this by embedding a few CSS rules inside
@media print { ...}
inside the stylesheet itself.
I do assemble stylesheets from modules and I do this with @import
rather than multiple <link>s
Again, both of these work, but there's simply no strong argument that
you can't do them another way if you wish.
And which should I use, given that I am trying
to make the (application/xhtml+xml) page as standard-conforming and
accessible as possible?
It's an interesting question as to just how "conformant" and
"accessible" you should make something. There's also the choice of just
which standard to conform to. Not to mention the added time and money
in authoring costs that these goals can add.
If you're trying to find any compromise here, then XHTML clearly isn't
the standard to be aiming at, nor is Appendix C. Go for HTML 4.01
Strict all the way.
I'd also suggest limiting accessibility. Netscape 4 just doesn't matter
any more, so forget the CSS hiding malarkey (either bogus comments or
sneaky @imports). Besides which, simply hiding a good layout from NS4
doesn't make it work well itself. The idea of simultaneously supporting
a 10 year old compatibility layout version is hideous.
Put the effort where it matters and its useful. Make your design fluid
and valid. Make sure that it works on phones and the $100 laptop.