Yes, if you want to send an HTML code to someone through Discord, you will need to carry out the following steps:
Copy the HTML page that you would like to share.
Head over to Discord and paste the HTML page into the text box.
Before you do anything else, type three backticks (‘’’) at the start and end of the HTML link, and then press enter to send.