Use an ESP8266 or ESP32 to create a WiFi Infrared Blaster and send code using your mobile phone or a tablet
This is the Project that gave me the core code for the Arduino sketch and the ajax script.
I stripped out all "HTTP_GET" functionality in my project as I only wanted to send "HTTP_POST" commands. If you need to pull data into your HTML like sensor readings then you'll need to look at the core code source project for that detail.
IRremoteESP8266 This library has an impressive list of supported protocols.
ArduinoJson to facilitate the AJAX exchanges
You need to make sure the Arduino IDE has support for the ESP8266 or the ESP32 Dev boards installed.
Plus SPIFFS upload support for the Arduino IDE is also needed. Here are links to instructions for the ESP32 and the ESP8266 for adding this tool.
You will most likely need to capture your own IR codes and if you get random captures (as I did) I strongly recommend you read this blog for the answer. In a nutshell it comes down to IR reciever center frequency and what carrier frequency the remote you are capturing uses. In my case both the Sky and Panasonic used 37Khz and the standard Arduino IR receiver has a center frequency of 38Khz.
I swapped to a TSOP4136 (36Khz center frequency) IR receiver hardwired to the ESP controller and everything burst into life.
To capture IR codes I recommend you use the example sketch in the library called "IRrecvDumpV2". It's what worked for me. The switch and the LED shown in the image below were only for developement and debugging.
The HTML and CSS are the most time consuming and to help avoid incorrectly assigning ID's and IR codes to the wrong buttons I added them as comments to the IR library (irCodes.h) The DOM ID is the array index position. As the remotes are numerically grouped this also let me do a simple "IF" statement for switch case encoder assignment. The core code-source project used IR header hex values that may work for you but were not optimal in my case.
In my project I'm not hosting the javascript or Font Awesome libraries so internet access is required.