I want to know how to highlight my code in HTML like this.
<font color="#1773cc">#include </font><font color="#4a6f8b"><NTL/ZZ.h></font><br>
<br>
<font color="#b02f60"><b>using</b></font> <font color="#008b00"><b>namespace</b></font> std;<br>
<font color="#b02f60"><b>using</b></font> <font color="#008b00"><b>namespace</b></font> NTL;<br>
<br>
<font color="#008b00"><b>int</b></font> main()<br>
{<br>
ZZ a, b, c; <br>
<br>
cin >> a; <br>
cin >> b; <br>
c = (a+<font color="#ff8b00">1</font>)*(b+<font color="#ff8b00">1</font>);<br>
cout << c << <font color="#4a6f8b">"</font><font color="#8a2ae2">\n</font><font color="#4a6f8b">"</font>;<br>
}<br>
code from here
Just using <font color="#xxxxxx">xxx<font>
to highlight code.
Is there a tool to implement this, or I have to write it by hand?
I've tried some tools, like Typora and Vim, but that's not what I want.
I want to highlight code using <font color="#xxxxxx">xxx<font>
.
Is there a tool to implement this, or do I have to write it by hand?
To highlight your HTML code you have to use a library on your website. There you can find many libraries for this purpose but I think this is one of the best options you could have.
Please visit the link and follow the instructions to include.
PS: I don't recommend writing it on your own.