user56216: As per How do we get syntax highlighting?, only the programming tag has the feature enabled.
But I'm seeing that the tag arduino-uno also is highlighting the code, for example this question.
Are there more tags out there that have syntax highlighting? I edited a couple of questions to add the programming tag but maybe sometimes it won't be necessary and it's a cool feature that all answers follow the question highlight.

user37523: The short answer to your question is to use this syntax: <!-- language-all: lang-cpp --> right above the first block of code.
Here is an example of a question with the syntax highlighting "not working".


Paste in the "html style" syntax as specified in the next image.



Add 4 spaces.



Give it a few seconds, then the highlighting should start working.


Using this method, all of the following code "blocks" will be treated as C++.
The long answer to your question is here: How Do I format my Code Blocks.

56216: <p>As per <a href="https://arduino.meta.stackexchange.com/q/45/56216">How do we get syntax highlighting?</a>, only the <a href="https://arduino.stackexchange.com/questions/tagged/programming" class="post-tag" title="show questions tagged &#39;programming&#39;" rel="tag">programming</a> tag has the feature enabled.</p>

<p>But I'm seeing that the tag <a href="https://arduino.stackexchange.com/questions/tagged/arduino-uno" class="post-tag" title="show questions tagged &#39;arduino-uno&#39;" rel="tag">arduino-uno</a> also is highlighting the code, for example <a href="https://arduino.stackexchange.com/questions/9843/calculating-time-between-serial-events">this question</a>.</p>

<p>Are there more tags out there that have syntax highlighting? I edited a couple of questions to add the programming tag but maybe sometimes it won't be necessary and it's a cool feature that all answers follow the question highlight.</p>
 37523: <p>The short answer to your question is to use this syntax: <code>&lt;!-- language-all: lang-cpp --&gt;</code> right above the first block of code.</p>

<p>Here is an example of a question with the syntax highlighting "not working".</p>

<p><a href="https://i.stack.imgur.com/iRFXU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iRFXU.png" alt="enter image description here"></a></p>

<ol>
<li>Paste in the "html style" syntax as specified in the next image.</li>
</ol>

<p><a href="https://i.stack.imgur.com/3c0tm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3c0tm.png" alt="enter image description here"></a></p>

<ol start="2">
<li>Add 4 spaces.</li>
</ol>

<p><a href="https://i.stack.imgur.com/4LCwS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4LCwS.png" alt="enter image description here"></a></p>

<ol start="3">
<li>Give it a few seconds, then the highlighting should start working.</li>
</ol>

<p><a href="https://i.stack.imgur.com/Ka7Sb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ka7Sb.png" alt="enter image description here"></a></p>

<p>Using this method, all of the following code "blocks" will be treated as C++.</p>

<p>The long answer to your question is here: <a href="https://meta.stackexchange.com/questions/22186/how-do-i-format-my-code-blocks">How Do I format my Code Blocks</a>.</p>
