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
- fb:name, fb:grouplink, fb:eventlink, fb:networklink, fb:user-table, fb:publisher-link (for calls to feed.publishUserAction only) fb:publisher-link
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 Stories: Allowed Tags
Depending upon the size of the Feed story, you can include various HTML and FBML tags.
One line story templates can contain the following HTML and FBML tags: <a>, <b>, <small>, fb:name, fb:pronoun, fb:ref, and fb:if-multiple-actors.
Short story templates can contain the following HTML and FBML tags: <a>, <b>, <br> (template body only), <i>, fb:name, fb:pronoun, fb:ref, fb:if-multiple-actors, and, for calls to feed.publishUserAction, fb:publisher-link.
For short stories, rich media like images, Flash, MP3, and video are rendered in the template_data parameter when you call feed.publishUserAction, Facebook.showFeedDialog, or JS_API_M_FB.Connect.showFeedDialog.
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, and, for calls to feed.publishUserAction, fb:publisher-link
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
- fb:dialog, fb:random, fb:userlink, fb:grouplink, fb:eventlink, fb:networklink, fb:user-table, and, for calls to feed.publishUserAction, fb:publisher-link
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
