code block example

Hey, i know code blocks are usually written using the pre tag, but since that's a nightmare to read and navigate through in the html due to the fact you have to un-indent everything inside of it, i tried to come up with a more manageable way of creating one. Is it an acceptible method? Am i allowed to put div tags in code tags and span tags inside of eachother etc? does it cause any accessibility or semantic problems etc? i'd appreciate any opinions, thanks in advance.

https://codepen.io/deerCabin/pen/GRbpzML
Was this page helpful?