JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> JS </title>
<link type="text/css" rel="stylesheet" href=".css"/>
<script src="js.js">
</script>
</head>
<body>
<h1> Green planet</h1>
<p id="greenplanet"> All is well</p>
<h1>Red planet</h1>
<p id="redplanet"> Nothing to report</p>
<h1>Blue planet</h1>
<p id="blueplanet"> All system a OK</p>
</body>
</html>
JavaScript
function init() {
var planet = document.getElementById("greenplanet");
planet.innerHTML = "Red Alert: hit by phaser fire!";
var planet = document.getElementById("redplanet");
planet.innerHTML = "all is ok thanks";
}
window.onload = init;