HTML Attributes

You can define common HTML attributes like id, class or style to any BBCode.

Example:
[b id="my-id" class="my-class-1 my-class-2" style="color: red;"]Text[/b]

AttributeExamplesDescription
idid="my-id"Defines the element id.
Optional.
classclass="my-class"
class="my-class-1 my-class-2"
Defines the element CSS classes.
Optional.
stylestyle="color: red;"
style="color: red; background: blue;"
Defines the element inline CSS style.
Optional.

IMPORTANT: Javascript code is not allowed in attributes for security reasons.

If you want to add a Javascript functionality to a BBCode, the best would be to give it a custom id or class and add your code in a separate .js file or through a custom code plugin.