>>>>>I have always been curious as to how this is done...
>>>>>
>>>>>How do you show a code block on a webpage? For example, when you want to post code on UT, you wrap it in code blocks. How is this implemented?
>>>>
>>>>I believe the standard PRE and CODE HTML tags preserve original identation.
>>>>The syntax coloring is done by the custom code in the parser itself, in the standard HTML there would not be any coloring.
>>>
>>>I didn't realize there were standard HTML tags. I thought it was all done in a parser.
>>>
>>>Thanks!
>>
>>Found some samples, though not much
http://www.w3schools.com/html/html_formatting.asp (did a very quick search, I liked these tutorials at w3schools site long time ago).
>>
>>
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_computeroutput>
>Excellent... thank you!!
Check also this excellent post by gmmastros at
http://tek-tips.com/viewthread.cfm?qid=1350140&page=1 about how to add SQL Server color tags
It took me a while to find, because I forgot who posted it and started from two other MVPs and their threads.
If it's not broken, fix it until it is.
My Blog