const newElement = document.createElement('div');
      // Fill node HTML content
      element.innerHTML = 'htmlContent';
      // Append node to document
      document.body.appendChild(newElement);
      Javascript language logo

      Create DOM element

      HTML recipes

      Create a DOM element and add it to the doc

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.