window.location = 'URL';
Above line will tell the browsers window location i.e, our desired url or a web page. if i wanted to make a div clickable and take the user to mobifreaks.com the code be as following.
<div onclick="window.location = 'URL'"> <!-- Some data --> </div>
Making clickable elements in wordpress
The procedure is same, but we can’t add url manually, so lets automate them inside loop with the_permalink function
<div onclick="window.location = '<?php the_permalink(); ?>'"> <!-- Some data --> </div>
The same follows to any HTML element