Valid HTML Tags

Problem

FBML sounds great, but sometimes I just want to use good ole HTML. What can I get past the parser?

Solution

There’s actually quite a lot of standard HTML you can use inside an FBML page. Keep an eye on the Wiki for an up-to-date list (http://wiki.developers.facebook.com/index.php/FBML), but this should give you a good idea:

acodeh2legendscripttextarea
abbrddh3liselecttfoot
acronymdelh4linksmallth
addressdfnh5metaspanthead
bdivh6oldstriketr
bdodlhroptgroupstrongtt
bigdtioptionstyleu
blockquoteemimgpsubul
brfieldsetinputpresupvar
captionfontinsqtable 
centerformkbdstbody 
citeh1labelsamptd 

Discussion

You’ll note that head and body aren’t included as valid tags, because you shouldn’t include them in Canvas pages. This may go against everything you know when it comes to building valid HTML pages, but you’ll actually get an error if you include them.

Get Facebook Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.