A Pen by Sean Corbett

Thumbnail
This awesome code was written by Corpheus91, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright Corpheus91 ©
  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>A Pen by  Sean Corbett</title>
  
  
  
  
  
</head>

<body>

  
<html>
  <head>
    <meta charset="utf-8">
    <title>Company page</title>
  </head>
  <body>
    <p>Welcome! Here you can find following things:</p>
    <ol>
      <li><a href="#logo"><em>Company's logo</em></a></li>
      <li><a href="#employees">List of employees</a></li>
    </ol>

    <h1>Company's logo</h1>
    <p>Company uses following logos:</p>
    <ul>
      <li>New logo:<img src="new_logo.gif"/></li>
      <li>Old logo:<img src="old_logo.gif"/></li>
    </ul>

    <h1>List of employees</h1>
    
    <table>
      <tr>
        <th>First name</th>
        <th>Last name</th>
      </tr>
      <tr>
        <td>Mary</td>
        <td>Williams</td>
      </tr>
      <tr>
        <td>James</td>
        <td>Smith</td>
      </tr>
    </table>
  </body>
</html>
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/Corpheus91/a-pen-by-sean-corbett-ypKZJY */


function appendChildren() {
  var allDivs = document.getElementsByTagName("div");
  allDivs = [].slice.call( allDivs )'
  console.log(allDivs)
  allDivs.forEach(function(div){
    var newDiv = document.createElement("div");
    // newDiv = decorateDiv(newDiv);
    div.appendChild(newDiv);
  });
}

appendChildren()

Comments