Introduction

BBCode or Bulletin Board Code is a lightweight markup language used to format posts in many message boards. The available tags are usually indicated by square brackets ([ ]) surrounding a keyword, and they are parsed by the message board system before being translated into a markup language that web browsers understand—usually HTML or XHTML.

The description of Kunena BBCode does not imply that these features exist or work in the same manner in other forums or vice versa.

Purpose

BBCode was devised to provide a safer, easier and more limited way of allowing users to format their messages. Previously, many message boards allowed the users to include HTML formatting, a side effect of which was that malformed HTML could disrupt the page's layout, or HTML could be used to run JavaScript leading to XSS attacks. Some implementations of BBCode have suffered problems related to the way they translate the BBCode into HTML, which could negate the security that was intended to be given by BBCode. An alternative is a properly written HTML filter (many of which are freely available).

Although the basic tags of BBCode are similar, in most internet forum software there is currently no standards document for BBCode and there are consequently many incompatible variants. Some variants are case-sensitive while others are not. Some variants have tags which highlight the formatting of HTML, PHP, CSS and other markup languages and programming languages.

BBCode Tags

Available BBCodes

 

BBCode

Result

[b]text[/b] text
[i]text[/i] text
[u]text[/u] text
[strike]text[/strike] text
Text[sub]subtext[/sub] Textsubtext
Text[sup]suptext[/sup] Textsuptext
[size=5]Text in size 5[/size] [size=4]four[/size] [size=3]three[/size] Text in size 5 four three
[color=#FF0000]coloured text[/color] [color=lime]Lime[/color] [color=green]Green[/color] coloured text[1] Lime Green[2]
[ul]
[li]listpoint 1[/li]
[li]listpoint 2[/li]
[/ul]
  • listpoint 1
  • Listpoint 2
[ol]
[li]Item the first[/li]
[li]Item the second[/li]
[/ol]
  1. Item the first
  2. Item the second
 [li]List Item[/]
  • list item
[hr] Draws a horizontal rule
[left]Align text to the left[/left] Align text to the left
[center]Center text[/center] Center text
  [right]Align text to the right[/right]  Align text to the right
   [quote]text[/quote]       text
 

Insert a two row two column table:

[table]
  [tr]
   [td]Row 1, Col 1 Data[/td]
   [td]Row 1, Col 2 Data[/td]
  [/tr]
  [tr]
   [td]Row 2, Col 1 Data[/td]
   [td]Row 1, Col 2 Data[/td]
 [/tr]
[/table]

 
Row 1, Col 1 Data Row 1, Col 2 Data
Row 2, Col 1 Data Row 2, Col 2 Data
[hide]Text cannot be seen unless user is logged-in[/hide] Part of the message is hidden for the guests. Please log in or register to see it.
     
     
     
Opens the emoticons selection screen  
     
     

Please login to post comments and/or see attachments