Code to display posts with tags


I have created a form, upon clicking the submit button, the user should linked to another site with pre-selected blog posts (based on the answers).

I was thinking about tagging/categorizing the (blog) posts based on the possible answers in the form (e.g. selecting “adventure” should show all posts with this tag).

Starting with an onclick event but not quite sure how to proceed from there. Any help is much appreciated.