Home > Documentation > NuGram Hosted Server BBCodes guide
NuGram Hosted Server BBCode guide
Registered users of NuGram Hosted Server have the opportunity to comment on published grammars. Those comments may consist in a few lines written on the spur of the moment. However, those willing to take some more time formatting their messages in order to clarify their intent have the BBCode markup language at their disposal. BBCode tags form a lightweight markup language. Think of them as an easier and safer alternative to HTML. NuGram Hosted Server store comments together with their BBCode tags and make sure to publish them with the intended formatting.
Using BBCode tags is easier than embedding HTML snippets because users don't have to fear breaking the overall page's layout with malformed HTML. It's safer because BBCode tags conversion prevents the injection of embedded JavaScript leading to cross-site scripting attacks. Any HTML tag embedded in a comment is merely disabled and displayed as textual content.
Text formatting
BBCode offers tags allowing you to quickly change the basic style of your text. These tags apply to the textual content enclosed between their opening and closing marks.
| Tag | Result |
|---|---|
| [b]...[/b] | bold text |
| [i]...[/i] | italic text |
| [u]...[/u] | underlined text |
| [s]...[/s] | strikethrough text |
| [sub]...[/sub] | some subscript text |
| [sup]...[/sup] | some superscript text |
| [color=name]...[/color] | pick forestgreen or hotpink from a list of color names that are supported by major browsers. |
| [color=code]...[/color] | specify a color using either a three or a six-digit hexadecimal code like #f61 or #008B8B. |
| [size=size name]...[/size] |
specify font size using using a CSS pre-defined font size name
among xx-small, x-small, smaller, small,
medium, large, larger, x-large,
and xx-large.
This is larger while this is smaller. |
| [size=n<unit>]...[/size] |
specify font size using using CSS font size unit
among %, px, pt, em
and ex. This is 3ex high while this is 10px high. Default unit is px. |
Text alignment
BBCode offers tags allowing you to separate your text in blocks and specify their horizontal alignment. These tags apply to the textual content enclosed between their opening and their closing marks.
| Tag | Result |
|---|---|
| [left]...[/left] | create a separate block for the contents, aligned horizontally to the left of the surrounding blocks. |
| [center]...[/center] | create a separate block for the contents, aligned horizontally to the center of the surrounding blocks. |
| [right]...[/right] | create a separate block for the contents, aligned horizontally to the right of the surrounding blocks. |
Specialized containers
BBCode offers tags allowing to create special blocks associated to either quotations or grammar code snippets. These tags apply to the textual content enclosed between their opening and their closing marks.
| Tag | Result |
|---|---|
| [code]...[/code] | create a separate block for code-like contents, leaving the preformatted input as-is. |
| [code=operational]...[/code] | create a separate block for code-like contents, leaving the preformatted input as-is but enabling formatting using BBCode tags. |
| [quote]...[/quote] | create a separate block for an anonymous quote. |
| [quote=author]...[/quote] | create a separate block for a quote attributed to author. If author happens to be some NuGram Hosted Server username, then a link to this user page is introduced. |
Links
BBCode offers tags allowing you to introduce links in your comments refering to external sources of information. Links are enclosed between opening and closing url marks, but raw links starting with with either http:, https:, ftp: or mailto: are automatically processed.
| Tag | Result |
|---|---|
| [url] actual URL [/url] | create a link to the enclosed URL |
| [url=<actual URL>] label [/url] | create a link to the specified URL using the enclosed text as a label |
| http://<some URL> | create a link to the specified URL |
Lists
BBCode offers tags allowing you to list items in your comments. Lists are enclosed between opening and closing list marks, but actual list items are simply introduced by an opening [*] mark without any closing [/*] mark.
| Tag | Result |
|---|---|
| [list] [*]... [*]... [/list] | create an unordered list, items introduced by disc-bullets |
| [list=1] [*]... [*]... [/list] | create an ordered list, items introduced by Arabic numerals |
| [list=a] [*]... [*]... [/list] | create an ordered list, items introduced by lowercase letter |
| [list=A] [*]... [*]... [/list] | create an ordered list, items introduced by uppercase letter |
| [list=i] [*]... [*]... [/list] | create an ordered list, items introduced by lowercase Roman numerals |
| [list=I] [*]... [*]... [/list] | create an ordered list, items introduced by uppercase Roman numerals |
| [list=circle] [*]... [*]... [/list] | create an unordered list, items introduced by circle-bullets |
| [list=disc] [*]... [*]... [/list] | create an unordered list, items introduced by disc-bullets |
| [list=square] [*]... [*]... [/list] | create an unordered list, items introduced by square-bullets |
Proofreading BBCode tags
Right before publishing a comment on NuGram Hosted Server, you have the opportunity to proofread the structure of your BBCode tags. NuGram Hosted Server warns of any overlapping tags, missing closing marks or invalid arguments.
Try it yourself
Comments are published to the NuGram Hosted Server using a text box similar to the following. You have the ability to either proofread the BBCode tags or see the comment as actually published. Feel free to try out BBcode tagging in this text input box, no comments is actually published.