BBCode (Bulletin board code) is a markup language used in many forums for laying out and formatting posts. The actual language varies with the forum software used, but usually comes in the form of keywords enclosed with square brackets, which look like element tags in XML. The BBCode is then parsed and converted to HTML. This provides a separation between the content and the actual HTML, eliminating any exploits.
BBCode references:
Examples
Some quick examples here. BBCode is in several ways a bit like HTML, although HTML is a standardized markup language.
| BBCode | Output |
|---|---|
[b]bold[/b] |
bold |
[i]italicized[/i] |
italicized |
[u]underlined[/u] |
underlined |
[url="http://example.com"]example.com[/url] |
example.com |
- Images
Images are displayed using [img], similar to the HTML <img src="xxx" />:
- [img]http://example.com/bullet.jpg[/img]
- Tables
Tables are usually implemented using [table], [tr] and [td].
- Horizontal lines
Horizontal lines are usually [hr].