New course! Every coder should learn Generative AI!
Try a free lesson0
How to coloring and styleing pre tag(<pre>)
I want to coloring pre tag More than 1 color , multiple color
16 Answers
0
Give the page title an id
+ 1
#lol {
Insert there anything in css
}
+ 1
You can style "pre" tag as other tags.
Other tags in it you can wrap in "span" tags, for each span give a class(for example "h1" tag in span can have .h1 classname, acording to that h1 classname can have different style then h2 tag, and so on).
+ 1
I mean you can even change each element's color differently in pre tag
0
<pre id="lol" hdjdbf</pre> and then in css
0
How can add multiple color
0
I can just set the color of all documents but i want to have different color for example tag's color red semicolons green
0
If u wanna have diff color for your tags u have to give the tags a class not pre
0
https://www.samanthaming.com/tidbits/20-extract-arguments-using-array-destructure/
Look at this link
She put her example in the pre tag but how she style this
0
Looks like js for me and not like css nor html
0
This is my code
I could just color tags with <span> but how can i color
Page title to green
https://code.sololearn.com/W172Xa7EL8y3/?ref=app
0
Thanks Florain Vanik
0
No problem
0
It have solved
https://code.sololearn.com/W172Xa7EL8y3/?ref=app
0
I know
Thanks
0
Assign a id to it