Creating a web page in W3.CSS: JavaScript

This builds on w3school's crash course. Use what you need.

Hiding elements

Tne w3schools example uses online JavaScript in the head to hide elements.

<script src="https://www.w3schools.com/lib/w3.js"></script>

<p>
		<button onclick="w3.hide('#London')">Hide London</button>
	    <button onclick="w3.show('#London')">Show London</button>
</p>

You can change the color in the button specification, e.g.

<button class="w3-amber" onclick="w3.hide('#London')">Hide London</button>
<button class="w3-amber" onclick="w3.show('#London')">Show London</button>

This is the result.

Light-green for div