<html>
<body>
<script language="JavaScript">
function function1() {
document.all.myP.style.cssText = "color:green; font-family:verdana; font-weight:bold; font-size:16";
}
</script>
<p id="myP">Text Text Text Text Text Text Text Text </p>
<input type="button" value="Click to apply the style rules" onClick="function1();">
</body>
</html>