Discuss Scratch

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">&lt;!-- Code tags are implemented like this:--></span>
            <span class="cp">&lt;!DOCTYPE html></span>
            <!-- and so on -->
        </pre>
    </div>
</body>
As you can see, the class names are quite cryptic. I tried to look for an explenation, but failed.
Does anyone know all of them?

Thanks to #5 for the answer!

Last edited by mybearworld (May 28, 2022 14:05:49)


2+2*5 = ?
2+2*5 = 20
2+2*5 = 12
2+2*5 = 77034585053198940266692661
MagicCrayon9342
Scratcher
1000+ posts

Does anyone know all the classes for the code tag?

mybearworld wrote:

<!-- Code tags are implemented like this: -->
<!DOCTYPE html>
<body>
    <div class="code">
        <pre>
            <span class="c">&lt;!-- Code tags are implemented like this:--></span>
            <span class="cp">&lt;!DOCTYPE html></span>
            <!-- and so on -->
        </pre>
    </div>
</body>
As you can see, the class names are quite cryptic. I tried to look for an explenation, but failed.
Does anyone 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.



Templates:

Doesn't belong in the ATs:
Unfortunately, this post does not belong in the Advanced Topics. Please report your post, and in the box type the following:
Please move this post to ‘Thinks I’m Making or Creating' or ‘Show and Tell’
mybearworld
Scratcher
1000+ posts

Does anyone know all the classes for the code tag?

MagicCrayon9342 wrote:

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.
I know, but is there a way we know all of them?

2+2*5 = ?
2+2*5 = 20
2+2*5 = 12
2+2*5 = 77034585053198940266692661
MagicCrayon9342
Scratcher
1000+ posts

Does anyone know all the classes for the code tag?

mybearworld wrote:

MagicCrayon9342 wrote:

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.
I know, but is there a way we know all of them?
I can only assume html comments have the class ‘c’
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.



Templates:

Doesn't belong in the ATs:
Unfortunately, this post does not belong in the Advanced Topics. Please report your post, and in the box type the following:
Please move this post to ‘Thinks I’m Making or Creating' or ‘Show and Tell’
Mrcomputer1
Scratcher
500+ posts

Does anyone know all the classes for the code tag?

https://cdn.scratch.mit.edu/scratchr2/static//djangobb_forum/css/pygments.css

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 - 21H2), Firefox 102.0b9
——————–
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?

Powered by DjangoBB

Standard | Mobile