<html>
<body>
<img src="klematis.jpg" alt="flower" width="150" height="113">
<img src="klematis2.jpg" alt="flower" width="152" height="128">
<img id="myImg" src="smiley.gif" alt="Smiley face" width="42" height="42">
<p>Click the button to add a black dotted border of the first image in the document.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.images[0];
x.style.border = "10px dotted black";
}
</script>
</body>
</html>