javascript example

by Cindy Cullen

HTML

<p id="replace">This is text we want to change.</p>
<button type="button" onclick="document.getElementById('replace').innerHTML = 'We will change the text to this.'">

Click to change the text!</button>

<button type="button" onclick="document.getElementById('replace').style.fontSize='35px'">Click to change the size of the text</button>