HTML exercises are slow in Safari for macOS

Starting with the “Link to External Pages with Anchor Elements”, the program is slow; keystrokes take at least 1 second to show up on the screen. This problem is not present with the latest version of Firefox.

I’m using Version 11.1.1 (13605.2.3) of Safari and macOS 10.13.5 Beta (17F45c) on a 2012 15" MBP with Retina Display. My version of Firefox is Firefox Quantum 59.0.2 (64-bit).

Edit: scrolling in the command line is also very slow and delayed.