How do i save a html code as a file?

Having trouble with saving my code as a file for a demonstration, anybody know how to do this?

This things are kind of difficult to explain over a forum, thankfully people made videos:

in short, you need to give it a filename which ends with .html, then under the filename field, you have to select file type all.