This is done not through style sheet but Javascript and DOM. Using your
body
element, you can call some Javascript to set up all other event handlers programmatically:
<html
<head>
<title>???</title>
<script type="text/javascript"></script>
</head>
</body onload="Javascript:OnLoadHandler()">
</html>
This is just a skeleton.
Another option is to auto-generate all HTML content with some server-side technology. You can mix auto-generated context with HTML code using ASP.NET, JSP, PHP…
—SA