A little infrastructure now. We want to display messages while the game is running ans to display the winner. We will create two spans that initially have nothing in them. To display a message, we find the span we want and change a property. Each tag object has a innerHTML property that contains the HTML between the begin and end tags. If we have a paragraph like
<p> This text has a <b>word</b> in bold. </p>
The innerHTML property of this paragraph is
This text has a <b>word</b> in bold.
If we set the innerHTML property of the span, then the new text will appear on the browser display. We also need a reset button to clear the board for a new game. We will put all this in a table to make it line up.