It'd might easier to do this with a little bit of javascript in the headinclude template (or add it to $headinclude in a plugin like global_start).
Something like this might do it ...
HTML Code:
<script type="text/javascript">
<!--
window.addEvent('domready', function () {
document.getElementsByTagName('html')[0].setAttribute('id','blah');
});
-->
</script>
-- hugh