BBCode for Beginners
What is BBCode?
BBCode (Bulletin Board Code) is a lightweight markup language that is used to format articles on World Anvil (it's also used in many other places on the web). If you are already familiar with a markup language like HTML, learning to use BBCode will be a breeze. On the other hand, if all of that sounds like gibberish to you, don't panic! BBCode is easy to learn, and if you read through this article, you'll be a master in no time.
The Anatomy of BBCode
Normal Tags
BBCode usually looks something like this:[p]This is a paragraph.[/p]
Notice that there are three different parts here:
[p] - This is called the opening tag, it tells the computer when to start formatting the text, in this case we're telling the computer to start a new paragraph.
This is a paragraph. - Between the start and end tags is where you put the text that you would like to be formatted.
[/p] - This is called the closing tag, the forward slash is very important. The closing tag tells the computer when to stop formatting the text, in this case we're telling the computer that the paragraph has ended.
Self-closing Tags
Self-closing BBCode tags have no closing tags because it is not possible to put text inside them, examples include the [hr] tag, which creates a horizontal line across the page, and the [br] tag, which creates a line break.Nesting Tags
Some tags can be "nested" within other tags. For example, if you wanted to make something bold and italic, the BBCode would look something like this:[b][i]your text here[/i][/b]
The order here is important, notice that the [i] tags are on the inside and the [b] tags are on the outside. You could just as easily put the [i] tags on the outside, but you cannot have one on the inside and one on the outside.
How to Add BBCode to your Articles
There are four ways to insert BBCode in World Anvil:- Click on one of the buttons above the text editor to insert the corresponding empty BBCode tags.
- Highlight a section of text, then click on one of the buttons above the text editor to wrap the corresponding BBCode tags around it.
- Type in the BBCode tags, this is the only way to access certain tags, such as h4 headings.
- Highlight a section of text, then use one of the keyboard shortcuts to wrap the corresponding BBCode tags around it. You can also use the shortcuts without having anything highlighted, which will create empty tags.
Fig. 1.1
Keyboard Shortcuts
You can see these while you are editing any article by hovering over the red box labeled "new!".- Paragraph: Ctrl + P
- Bold: Ctrl + B
- Italic: Ctrl + I
- Underline: Ctrl + U*
- Strikethrough: Ctrl + S
- Subtext: Ctrl + Shift + ↓
- Supertext: Ctrl + Shift + ↑
- Heading 1: Ctrl + Shift + 1
- Heading 2: Ctrl + Shift + 2
- Heading 3: Ctrl + Shift + 3
Remove these ads. Join the Worldbuilders Guild
Comments