my use-case is the following :
I\'m composing an HTML page by using parts that are valid HTML fragments but not valid pages, like <
There is no standard way (EDIT: as of HTML5 there apparently is!) of adding a element outside of the
tag - it is only allowed there and NOT within the
tag (See the DTD here).
If you want to style your HTML fragments individually and not use CSS styles in your head, you will need to resort to inline styling. However: Most browsers understand tags within the body, so you may as well use them, but your page won't be standards compliant.
In any way:
From what I understand you use some kind of templating, where you insert different HTML snippets into the page with different designs. Is it so bad if you put all styles within one big CSS file?
Would it be impossible for you to dynamically load a another CSS file (via JS or server side scripting), when your HTML fragment gets inserted in the page (this would be the preferred method)?