JSFiddle - React, Tailwind, and code Playground

by putriarisnawati

HTML

<!doctype html>
<html lang="en">
<head>
    <title>Title</title>
    <meta charset="utf-8">
    <link type="text/css" rel="stylesheet" href="style.css">
    <link type="text/css" rel="stylesheet" href="960.css">
    <link type="text/css" rel="stylesheet" href="reset.css">
    <link rel="icon" type="image/png" href="favicon.png">
</head>
<body>
    <div class="container_12" id="wrapper">
        <div class="grid_12" id="content">
            <p id="element1" class="grid_3">element 1</p>
            <p id="element2" class="grid_3">element 2</p>
            <p id="element3" class="grid_3">element 3</p>
            <p id="element4" class="grid_2">element 4</p>        
        </div><!--end content-->
                
        
    </div><!--end wrapper-->
    <script src="js.js"></script>
</body>
</html>

JavaScript

var newDiv = document.createElement("div");
var newContent = document.createTextNode("Hi there and greetings!");
newDiv.appendChild(newContent);

var theParent = document.getElementById('content'); //get the parent
theParent.appendChild(newDiv); //reposition the first child element