cpradio
September 13, 2014, 11:38am
2
Did you know you can embed your code with highlighting?
Okay, so I guess it is safe to assume that everyone knew you could do this, but do you know how to do it?
The simplest method is to use backticks `, three of them to be exact (well six… but I’m jumping ahead here) on a single line, like so:
```
Followed by your code
<a href=“mylink.htm”>My Link Text</a>
Followed by three more backticks ` on a separate line.
```
Put it all together and you get:
```
<a href=“mylink.htm”>My L…
The easiest way to determine if it isn’t valid is to go to http://validator.w3.org/#validate_by_uri+with_options
Enter your site address, click More Options, and choose HTML5 (experimental) from the Document Type dropdown. If you get errors, you know you have a few things to correct.