How to add X-Frame-Options header to a simple HTML file?

X-Frame-Options is an HTTP header. As such, it’s not part of HTML and can’t be set inside an HTML document. One reason why it’s an HTTP header only is that clients should be able to decide if the document is allowed to be embedded in a frame before parsing the HTML code.. Hence, you can’t achieve that by editing the file but you need to modify the server’s HTTP response.

https://security.stackexchange.com/questions/167081/how-to-add-x-frame-options-header-to-a-simple-html-file