Styles should not be referenced by a

(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.
So: <link type="test/css" href="(...).css" rel="stylesheet" /> is wrong,
it should be <style type="text/css" src="(...).css" />.


css Zen Garden
Because 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:

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:

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

Inline JS: <script>...</script> and
External JS: <script src="" />

That makes sense. The same should be possible for

💬 webdev