Code in tip/trick posts should be wrapped with <pre> </pre>
tags to ensure formatting and colouring are correct.
For example:
<pre lang = "vb">
' Example
Dim test As String
</pre>
will produce:
Dim test As String
To specify the programming language, use lang="xxx" as follows:
<pre lang = "C++"> for native C++ formatting
<pre lang = "mc++"> for C++/CLI formatting
<pre lang = "aspnet"> for ASP.NET formatting
<pre lang = "cs"> for C# formatting
<pre lang = "css"> for CSS formatting
<pre lang = "F#"> for F# formatting
<pre lang = "html"> for HTML formatting
<pre lang = "Java"> for Java formatting
<pre lang = "jscript"> for JavaScript formatting
<pre lang = "asm"> for MASM/ASM formatting
<pre lang = "msil"> for MSIL formatting
<pre lang = "midl"> for MIDL formatting
<pre lang = "php"> for PHP formatting
<pre lang = "sql"> for SQL formatting
<pre lang = "vbscript"> for VBScript formatting
<pre lang = "xml"> for XML formatting
If you want to enter text like <pre lang = "xml">
:
- Check the allow HTML radio button in the Tip/Trick editor "When Pasting" option list. Use the article editor to enter text. Copy its HTML and paste here.
- Learn the special text for symbols like <(&-lt-; Remove the - for the symbol)