Styles should not be referenced by a14 Sep 2006
(If you don’t work with HTML, this next post will be of no interest to you.)
Rant: the way external CSS stylesheets are included in HTML now is not logical nor convenient.
href="(...).css" rel="stylesheet" />is wrong,
it should be
<style type="text/css" src="(...).css" />.
src is for now,
href is for later
In a HTML page, there are a number of files (URLs) that have to be fetched to display:
- any text in the document, within <h1>, <p> or <div> tags or not
- any images, specified as <img src=”” /> (always external)
- any iframes, specified as <iframe src=”” /> (always external)
There are also links to other URLs that are not for now: maybe one click away, maybe just there to be interpreted by the web browser:
- anchor links, specified as <a href=””></a>
- links: prev/next, archive links, feed link, specified as <link rel=”” href=”” />
So: you need the
src="" referenced files immediately, and the
href="" ones not. The way stylesheets are referenced now breaks this logic.
Why can you embed in-line CSS style information within
<script src="" />
That makes sense. The same should be possible for