- const range = 100;
- for(let i = 1; i <= range; i++)
	.fizz
View Compiled
body {
	counter-reset: fizz 0;
}

.fizz {
	counter-increment: fizz;
}

.fizz:not(:nth-child(5n))::before {
	content: counter(fizz);
}

.fizz:nth-child(3n)::before {
  content: 'fizz ';
}

.fizz:nth-child(5n)::after {
  content: 'buzz';  
}
/*
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
*/

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.