All Topics  
BBCode

 

   Email Print
   Bookmark   Link

 

BBCode


 
 

BBCode is an abbreviation for Bulletin Board Code, the lightweight markup languageLightweight markup language

A lightweight markup language is a markup language with a simple syntax, designed to be easy for a human to enter with a sim...
 used to format posts in many message boards. It is also called forum codes. The available tags are usually indicated by rectangular brackets surrounding a keyword, and they are parsedParsing

In computer science, parsing is the process of analyzing an input sequence in order to determine its grammatical structure w...
 by the message board system before being translated into a markup languageMarkup language

A markup language combines text and extra information about the text....
 that web browserWeb browser

A web browser is a software application that enables a user to display and interact with text, images, and other informatio...
s understand, usually HTMLHTML

In computing, HyperText Markup Language is a predominant markup language for the creation of web pages....
 or XHTMLXHTML

The Extensible HyperText Markup Language, or XHTML, is a markup language that has the same expressive possibilitie...
.

Purpose

BBCode was devised to provide a safer, easier and more limited way of allowing users to format their messages. Programmer convenience was certainly another factor, as BBCode is very simple to implement. 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 JavaScriptJavaScript

JavaScript is the name of Netscape Communications Corporation's implementation of ECMAScript, a scripting programming langua...
 leading to XSSCross-site scripting

Cross-site scripting is a type of computer security vulnerability typically found in web applications which can be used by a...
 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 forumInternet forum

An Internet forum is a facility on the World Wide Web for holding discussions, or the web application software used to provi...
 software, there is currently no standards document for BBCode and there are consequently many incompatible variants. Some variants are case-sensitiveCase sensitivity

Text sometimes exhibits case sensitivity, that is, words can differ...
 while others are not. Some variants have tags which highlight the formatting of HTMLHTML

In computing, HyperText Markup Language is a predominant markup language for the creation of web pages....
, ASPFacts About Active Server Pages

Active Server Pages is Microsoft's server-side technology for dynamically-generated web pages that is marketed as an add-on...
, PHPFacts About PHP

* Paamayim Nekudotayim* Standard PHP Library...
, SQLSQL

SQL is the most popular computer language used to create, modify, retrieve and manipulate data from relational database man...
 and other markup languageMarkup language

A markup language combines text and extra information about the text....
s and programming languageProgramming language

A programming language is an artificial language that can be used to control the behavior of a machine, particularly a compu...
s.

BBCode tags

The following are the most common BBCode tags available to most modern message boards, and are displayed here with their HTML equivalents. However, it should be noted that the effect of these tags can be changed substantially, and the effect may not be identical on all sites using BBCode.

BBCode HTML Effect
[b]bolded text[/b] bolded text or bolded text bolded text
[i]italicized text[/i] italicized text or italicized text italicized text
[u]underlined text[/u] underlined text underlined text
[url]http://example.org[/url] http://example.org
[url=http://example.com]Example[/url] Example
[img]http://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Go-home.svg/100px-Go-home.svg.png[/img]
[quote]quoted text[/quote]

quoted text


(usually implemented in more advanced ways)
To quote:

quoted text

[code]monospaced text[/code]
monospaced text
monospaced text
[size=15]Large Text[/size]
(The unit of measurement varies with each BBCode variant and could represent pixels, points, or relative HTML sizes.)
Large Text Large Text
[color=red]Red Text[/color]
or

[color=#FF0000]Red Text[/color]
(Both HTML color names and hexadecimal color values are generally supported.)
Red TextRed Text
[:-)]

:)

:smile:

(And other emoticonEmoticon

An emoticon, also called a smiley, is a sequence of ordinary printable characters, such as :-), xD ;o), t, ^_^, :-....
s, depending on the variant)


(Specific image and size vary)


Many message boards include a FAQFAQ

FAQ is an abbreviation for "Frequently Asked Question"....
 with information on how to use their own variants of BBCode. In addition, some bulletin board systems allow administrators to define their own custom BBCodes. This is usually done by asking them to specify the BBCode markup (utilizing variables/wildcards to indicate the user-customizable parts of the code) and then indicating the XHTML replacement which will be substituted for the BBCode.

External links

  • at phpBBPhpBB Summary

    phpBB is a popular free and open source forum system written in the PHP programming language; the name "phpBB" is an abbrevi...
    .com
  • [https://addons.mozilla.org/en-US/firefox/addon/128 BBCode extension] for Mozilla FirefoxMozilla Firefox Summary

    Mozilla Firefox is a free, open source, cross-platform, graphical web browser developed by the Mozilla Corporation and hundr...
  • [https://addons.mozilla.org/es-ES/firefox/addon/491 BBCodeXtra extension] for Mozilla FirefoxMozilla Firefox

    Mozilla Firefox is a free, open source, cross-platform, graphical web browser developed by the Mozilla Corporation and hundr...


PHP Implementations

  • - with configurable C library
  • - over 25 tags, bundled smilies and extras