Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

252
Views
Failed to execute 'createElement' on 'Document': The tag name provided () is is not a valid name

I am trying to spawn the DOM with some snowflakes.. I am getting this error in my console and no snowflakes.

Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('< span id='flake0' style='cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;position:absolute;top:-24'>• </ span>') is not a valid name.

I am not really sure what I am doing wrong here.. PHPStorm is also not giving me any hints. I am looping through all my snowflakes and they get random sizes.

Here is my code:

var container = document.getElementById("js-container");

for (let i = 0; i <= snowMax; i++) {
    var content = document.createElement("<span id='flake" + i + "' style='" + snowStyles + "position:absolute;top:-" + snowMaxSize + "'>" + snowEntity + "</span>");
    container.appendChild(content);
}

I also tried escaping the span with backticks, but it's not helping..

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!