Replace innerHTML with safe html parsing

Also adds `<meta name="viewport" content="width=device-width, initial-scale=1">` to display correctly on mobile devices.