This is basically an application of this tutorial from w3schools. I’ve created a fiddle for it and customized mainly the CSS.
Modals are a neat way to present content in an HTML page without making it look cluttered. You can use it to contain information you don’t want to be visible at all times. You increase the usability of your website by not having your user jump to a new page for small information or a form.
This is really more of a note to self haha but hope you find is useful too!