Most of us must have noticed custom markup tags being used in comment boxes and discussion forums. These custom markups would help you to format a text to make it bold, italics, add images, add url etc. Remember those? Well, these are known as BBCode or Bulletin Board Code.

BBCode or Bulletin Board Code is a lightweight markup language generally used to format posts in blogs and message boards.

The BBCode tags usually have a beginning and ending tag similar to HTML. BBCodes are usually indicated by the square brackets [ ]and contains a keyword within the [] tag , and the ending tags have the same keyword with a backslash ” / ” preceding the keyword. E.g [/b] . These BBCodes are parsed during the run-time to produce HTML or XHTML that can be understood by the browsers. Please keep in mind that you need to nest the tags properly as otherwise it might not work.

List of Commonly used BBCode tags or BBCode References

Name Syntax Purpose Result
Bold [b] Sample text [/b] Makes the wrapped text bold Sample text
Italic [i] Sample text [/i] Makes the wrapped text italics Sample text
Underline [u] Sample text [/u] Underlines the wrapped text Sample text
Strikethrough [s] Sample text [/s] Strikethrough the wrapped text Sample text
Link [url] http://bestfx.com [/url] Converts the url text to link – http://bestfx.com
Link (named) [url=”http://bestfx.com”]Link text [/url] Converts the wrapped text to link with the href as the parameter passed Link text
Image [img]http://test.com/img.jpg[/img] Embeds the image indicated in the url
Quote [ quote] Quoted text [/quote] Converts the text to a blockquote text.

Quoted text

Code [code] Code here [/code] Converts the text within to monospaced text.  Code here
Color [color=#FF0000]Red Text[/color] Styles to wrapped text with the specified color. Red Text
Font size [size=24]Sample text[/size] Changes the font size of the wrapped text to the specified font size. Sample text
Font face [face=Arial]Text[/face] Changes the font family of the wrapped text to the specified font. Sample text
Center [center] Sample text [/center] Center aligns the text within. Sample text
Left [left] Sample text [/left] Left aligns the text within. Sample text
Right [right] Sample text [/right] Right aligns the text within. Sample text
Justify [justify] Sample text [/justify] Justifies the text on left and right. Sample text is justified on the left and on the right.
Sub-script Sample [sub] text [/sub] Sub-scripts the text within. Sample text
Super-script Sample [sup] text [/sup] Super-scripts the text within. Sample text
Email [email] test@example.com [/email] Converts the email id within to a mailto link. test@example.com
Email (named) [email=test@example.com] Email Us [/email] Converts the text within to a mailto link with the href as the email address passed. Email Us
Large [large] Sample text [/large] Converts the font size of the text within to a larger size. Sample text
Large (Coloured) [large=#cccccc]Sample text[/large] Converts the font size of the text within to a larger size and changes the color to the specified colour code. Sample text
Small [small] Sample text [/small] Converts the font size of the text within to a smaller size. Sample text
Small (Coloured) [small=#cccccc]Sample text[/small] Converts the font size of the text within to a smaller size and changes the colour to the specified colour code. Sample text
List(unordered) [list] [li]Item 1[/li] [li]Item 2[/li] [/list] Generates an unordered list of the items specified
  • Item 1
  • Item 2
List(unordered) [ul] [li]Item 1[/li] [li]Item 2[/li] [/ul] A different way to Generate an unordered list of the items specified
  • Item 1
  • Item 1
List(Ordered) [ol] [li]Item 1[/li] [li]Item 2[/li] [/ol] Generates an ordered list of the items specified.
  1. Item 1
  2. Item 1