The 'code' tag, and why it matters...

Status
Not open for further replies.

KGIII

Administrator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
17,087
Reaction score
17,738
Credits
146,883
This is based off a PM conversation that made good sense to me.

The forum has a neat feature. That feature is the ability to format your text. Most of the time, there's no reason to format your text.

On the other hand, there's a time when it's very important. When is that? When it's code tags.

Note: You can get away without using code tags if it's just a line or two, but code tags make it easier to read, process, search, etc... If it's just a small amount of code, you can use 'markdown', which would be:

Code:
`code goes here`

The output would look something like:

code goes here

This is useful for a single line of code, or inline code use. For example:

sudo apt update && sudo apt upgrade -y

Otherwise, you can do entire blocks of code. To do this, use the formatting options above where you do your text entry. Like so:

Selection_038.png
You'll also see this screen:

Selection_039.png


When you're entering any sort of code, that is source code or output from the terminal, it's IMPORTANT to use the code tags.

It might not seem important to you, but you'll figure it out in time. Code tags are essential to preserve formatting. Using the code tags properly can be the difference between people taking an interest in your post and people just closing the tab rather than deal with a wall of unformatted text. (I do that far more often than you might think!)

If you're asked to use the code tags, it's easy to figure out. The above should help a bit but it's straightforward.

Thanks.

(The intent is to sticky this thread. Mods can perform edits, as it'll also get locked.
 
Last edited:
Status
Not open for further replies.


Follow Linux.org

Members online


Top