<strong id="test"></strong> <script> var pH= 'electrode in air \r\nHumidity of the earthі = Low \r\nLight = Low \r\nTemperature = 21.80 °C\r\nAir humidity = 52.50 %\r\n' test.innerHTML = pH.replace(/\r\n/g, '<br>') </script>