<!DOCTYPE html>
<html>
<head>
<title>Hide Image</title>
<script>
function hideImage(){
document.getElementById("mypic").style.display = "none";
}
</script>
</head>
<body>
<h2>Click Image to Hide</h2>
<img src="pic.jpg" width="250" id="mypic" onclick="hideImage()">
</body>
</html>