<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Set a value in a span using JQuery.</title>
</head>
<body>
<p>jQuery<span id="spanid" style="color:red"> Exercises</span>.</p>
<input id="button1" type="button" value="Click to see the changes" />
</body>
</html>
JavaScript Code: