Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Does anyone know all the classes for the code tag?
- mybearworld
- Scratcher
1000+ posts
Does anyone know all the classes for the code tag?
<!-- Code tags are implemented like this: --> <!DOCTYPE html> <body> <div class="code"> <pre> <span class="c"><!-- Code tags are implemented like this:--></span> <span class="cp"><!DOCTYPE html></span> <!-- and so on --> </pre> </div> </body>
Does anyone know all of them?
Thanks to #5 for the answer!
Last edited by mybearworld (May 28, 2022 14:05:49)
Signatures are the only place where assets links still work.
- MagicCrayon9342
- Scratcher
1000+ posts
Does anyone know all the classes for the code tag?
The class names do not pertain to the code itself from the looks of it, rather it pertains to how the code is displayed? The class names are probably for the syntax highlighting. The ‘pre’ tags probably keep the code in the exact layout and format that the user input it. The class ‘code’ probably resembles code blocks.As you can see, the class names are quite cryptic. I tried to look for an explenation, but failed.<!-- Code tags are implemented like this: --> <!DOCTYPE html> <body> <div class="code"> <pre> <span class="c"><!-- Code tags are implemented like this:--></span> <span class="cp"><!DOCTYPE html></span> <!-- and so on --> </pre> </div> </body>
Does anyone know all of them?
- mybearworld
- Scratcher
1000+ posts
Does anyone know all the classes for the code tag?
I know, but is there a way we know all of them? The class names do not pertain to the code itself from the looks of it, rather it pertains to how the code is displayed? The class names are probably for the syntax highlighting. The ‘pre’ tags probably keep the code in the exact layout and format that the user input it. The class ‘code’ probably resembles code blocks.
Signatures are the only place where assets links still work.
- MagicCrayon9342
- Scratcher
1000+ posts
Does anyone know all the classes for the code tag?
I can only assume html comments have the class ‘c’I know, but is there a way we know all of them? The class names do not pertain to the code itself from the looks of it, rather it pertains to how the code is displayed? The class names are probably for the syntax highlighting. The ‘pre’ tags probably keep the code in the exact layout and format that the user input it. The class ‘code’ probably resembles code blocks.
and the DocType tag has the class ‘cp’
You can write every syntax highlighting type into a code tag and see how it renders to know the classes.
- Mrcomputer1
- Scratcher
500+ posts
Does anyone know all the classes for the code tag?
My Profile / My User Page / My Talk Page
——————–
Progress bar to 1000+ Posts - Image might not be up to date
——————–
My browser / operating system: Windows NT 10.0 (Windows 11 - 22H2), Firefox 122.0b4
——————–
My ScratchX Extensions——–If you like this post, give me an internet!——–Sharp Scratch Mod
- mybearworld
- Scratcher
1000+ posts
Does anyone know all the classes for the code tag?
Signatures are the only place where assets links still work.
- Discussion Forums
- » Advanced Topics
- » Does anyone know all the classes for the code tag?