JavaScript Style Sheets
browser wars 1996 deadNetscape shipped a rival to CSS itself, written in JavaScript. This is the original CSS-in-JS, from 1996.
In 2026: Dead. JSSS ran only in Netscape 4, and Netscape 6 dropped it in 2000. Every browser since reads a style block typed text/javascript as an unknown script language and runs none of it, so the heading below stays its default size. The tag names had to be fully capitalised, document.tags.H1, or it threw.
Where it came from: Netscape JavaScript Style Sheets, Navigator 4, 1996. Dropped in Netscape 6, 2000. No other browser ever implemented it. Wikipedia ↗
<!-- Netscape's answer to CSS: a stylesheet written in JavaScript -->
<style type="text/javascript">
tags.H1.color = "purple";
tags.H1.fontSize = "28pt";
tags.P.fontStyle = "italic";
document.classes.warn.all.color = "red";
</style>
<h1>Styled by JavaScript in 1996. Plain by 2026.</h1>
<p>This paragraph asked to be italic.</p>
<p class="warn">This one asked to be red.</p>