It says here that it is not within HTML4, though I don’t really see where that’s spelled out in the text.
From what I can tell, based on this, it is ok to do so in HTML5 but I’m not entirely sure (assuming style is an HTML element?)
I am using this to rotate out a stylesheet and want it to be as valid as possible according to HTML5 specs, so wondering if I should rewrite it with a data-* element.
+1 Interesting question!
Instead of using a
styleblock, you should consider linking (link) to your stylesheets and then switch them out by referencing anidor aclass.That said,
titleis perfectly acceptable for astyletag in HTML5. You can use this as a hook for your stylesheet switching.http://www.w3.org/TR/html5/semantics.html#the-style-element
Fyi… this validates
http://validator.w3.org/#validate_by_input+with_options