put an image and link together

I need help on how to put an image and link together

<a href="http://www.yourlink.com"> <!-- link opening tag (you start your link) -->

    <img src="http://www.yourimage.jpg" /> <!-- your image -->

</a> <!-- link closing tag -->

^See above I used spaces and comments to help you understand