5250 and 3270 terminal emulator on web

I am studying the implementation of a 5250 terminal that works in the browser, but I have doubts regarding the rendering of the data on the screen... Initially I thought of creating a table and that table would have 24 rows and 80 columns, and after receiving the information from the server, the system would insert the information in the corresponding rows and columns ... But, then I remembered that the 5250 protocol has some more complex things, in rendering level, like buttons, radio buttons, checkbox and scrollbars ....

enter image description here

What would be the best way to implement this to work in the browser?

I thought of Canvas, WebGL ....