Paikallinen style-ohje.
Myös tällä on paikallinen style.
JQuery, head-elementtiin:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").removeAttr("style");
});
});
</script>
HTML-koodaukset:
<h3>Poistaa style-ohjeet</h3>
<p style="font-size:120%;color:red">Paikallinen style-ohje.</p>
<p style="font-weight:bold;color:blue">Myös tällä on paikallinen style.</p>
<button> Poista style p-elementeistä </button>