<html>
<head><style>
p { border: 1px solid red; }
#foo { border: 10px solid green; }
</style>
</head>
<p>
I should be surrounded by a thick green border.
</p>
<script>
document.getElementsByTagName("p")[0].id = 'foo';
</script>
