Allowed FBML and HTML Tags
From Facebook Developer Wiki
Facebook lets you utilize HTML and FBML throughout your applications, from the canvas page to various communication methods like Feed stories, email, and notifications.
Contents |
Canvas Pages: Allowed Tags
- a
- abbr
- acronym
- address
- b
- bdo
- big
- blockquote
- br
- caption
- center
- cite
- code
- dd
- del
- dfn
- div
- dl
- dt
- em
- fieldset
- font
- form
- h1
- h2
- h3
- h4
- h5
- h6
- hr
- i
- img
- input
- ins
- kbd
- label
- legend
- li
- link
- meta
- ol
- optgroup
- option
- p
- pre
- q
- s
- samp
- script
- select
- small
- span
- strike
- strong
- style
- sub
- sup
- table
- tbody
- td
- textarea
- tfoot
- th
- thead
- tr
- tt
- u
- ul
- var
Email: Allowed Tags
You can format your application email with the following HTML and FBML tags.
Block-level Elements
- hr, address, div, h1, h2, h3, h4, h5, h6, p, blockquote, pre
Special Inline Elements
- a, area, br, bdo, font, img, map, span
Table Elements
- table, th, tr, td, caption, thead, tbody, tfoot, fb:user-table
List Elements
- dl, dd, dt, li, ol, ul
Style Elements
- Head elements and attributes: link, meta, style, _style, _imgstyle, _class
- Text elements: strong, em, b, big, i, ins, u, del, s
Form Elements
- input, form, option, optgroup, select, textarea, label, fieldset, legend
Phrase Elements
- abbr, acronym, cite, dfn, em, kbd, code, samp, strong, var
FBML Link Tags
FBML Image Tags
FBML Internationalization Tags
Disallowed Tags in Email
You cannot include the following tags in application email.
- HTML tags: body, base, iframe, applet, bgsound, blink, char, colgroup, comment, dir, embed, frame, frameset, head, html, hx, ilayer, inlineinput, isindex, keygen, layer, listing, marquee, menu, multicol, nextid, nobr, noembed, noframes, nolayer, noscript, object, plaintext, param, rt, ruby, samp, sound, spacer, spell, wbr, xml, xmp
- Script elements and attributes: script, script_onload, _clicktohide, _clicktoshow
- Mock AJAX elements and attributes: _clickrewriteurl, _clickrewriteid, _clickrewriteform, flash_autoplay, fb:swf, fb:mp3, fb:flv
- Other FBML: fb:iframe, fb:header, fb:dashboard, fb:mediaheader, fb:friend-selector, fb:multi-friend-input, fb:request-form, fb:if-multiple-actors, fb:redirect, fb:tabs, fb:error, fb:success, fb:explanation, fb:editor, fb:share-button, fb:wallpost, fb:message-preview, fb:attachment-preview, fb:comments, fb:google-analytics, fb:random, fb:dialog, fb:dialogresponse
Feed/Stream Stories: Allowed Tags
You can include only plain text content in Feed/stream stories; they cannot contain any HTML or FBML tags.
However, you can include rich media like images, Flash, and MP3, which get rendered in the attachment parameter that you include when you call stream.publish, Facebook.streamPublish, or FB.Connect.streamPublish.
Notifications: Allowed Tags
You can include only the following tags in your application notifications.
- HTML: a, em, b, var, cite, dfn, i
- FBML: fb:name, fb:pronoun, fb:grouplink, fb:eventlink, fb:networklink
Boxes: Allowed Tags
Block-level Elements
- hr, address, div, h1, h2, h3, h4, h5, h6, p, blockquote, pre
Special Inline Elements
- a, area, br, bdo, font, img, map, span
Table Elements
- table, th, tr, td, caption, thead, tbody, tfoot, fb:user-table
List Elements
- dl, dd, dt, li, ol, ul
Style Elements
- Head elements and attributes: style, _style, _imgstyle, _class
- Text elements: strong, em, b, big, i, ins, u, del, s
Form Elements
- input, form, option, optgroup, select, textarea, label, fieldset, legend
Phrase Elements
- abbr, acronym, cite, dfn, em, kbd, code, samp, strong, var
Script Elements and Attributes
- script, script_onload, _clicktohide, _clicktoshow
Mock AJAX Elements and Attributes
- _clickrewriteurl, _clickrewriteid, _clickrewriteform
Flash-related FBML Tags
User Interactivity Tags
FBML Visibility Tags:
FBML Internationalization Tags
Other FBML Tags
Disallowed Tags in Boxes
You cannot include the following elements in profile boxes.
HTML Tags
- body, base, iframe, applet, bgsound, blink, char, colgroup, comment, dir, embed, frame, frameset, head, html, hx, ilayer, inlineinput, isindex, keygen, layer, link, listing, marquee, meta, menu, multicol, nextid, nobr, noembed, noframes, nolayer, noscript, object, plaintext, param, rt, ruby, samp, sound, spacer, spell, wbr, xml, xmp
FBML Tags
- fb:iframe, fb:redirect, fb:attachment-preview, fb:prompt-permission, fb:comments, fb:board, fb:google-analytics
Script Elements and Attributes
- script_onload
Mock AJAX Elements and Attributes
- flash_autoplay
- Relative URLs
Mobile Applications: Allowed Tags
You can format your mobile applications with the following HTML and FBML tags. You must wrap any mobile content (both XHTML and FBML) in fb:mobile tags.
Block-level Elements
- hr, address, div, h1, h2, h3, h4, h5, h6, p, blockquote, pre
Special Inline Elements
- a, br, bdo, img, span
Table Elements
- table, th, tr, td, caption, thead, tbody, tfoot, fb:user-table, fb:user-item
List Elements
- dl, dd, dt, li, ol, ul
Style Elements
- Head elements and attributes: style, _style, _imgstyle, _class
- Text elements: strong, em, b, big, i, ins, u, del, s
Form Elements
- input, form, option, optgroup, select, textarea, label, fieldset, legend, fb:submit
Phrase Elements
- abbr, acronym, cite, dfn, em, kbd, code, samp, strong, var
FBML Image Tags
FBML Link Tags
FBML Page Navigation Tags
Other FBML Tags
