How to Create Rich HTML Tabs on Your Facebook Page

How to Create Rich HTML Tabs on Your Facebook Page

Dec 1, 2009 by Victor Murygin | Facebook

If you are a Webmaster or HTML developer, whether in a big company or a small business you should probably know by now that creating a Facebook page can be a very important social marketing tool these days. Hopefully, you already have a Facebook page created for your business; if not, you should definitely look into setting one up and reading up on some Facebook Marketing Tactics.

One important thing about these Facebook pages is that besides standard Facebook wall interaction, they allow you to create custom tabs where you can use HTML to design and build creative small boxes that can be mini-websites on their own.

Here are some examples of the Facebook tabs from Best Buy and Gap:

Best-Buy

Gap

As you can see, one can get very creative with these – just like for your website design.

Why would you want to create these tabs? Well, it’s a good way to update your Facebook content and promote anything new. If you’re a store that sells products, you may want to create a new tab every time you have a big sale or to outline a new line of products. If you benefit from seasons/holidays, you can update the tabs according to seasonal sales and specials. There are tons of reasons, but the bottom line is that you want to create and constantly update interactive content and stay in touch with your Facebook audience.

So, how exactly do you do add these tabs and work with HTML?

You should add a Static FBML application to your Facebook page, which will allow you to create new tabs/boxes and render HTML code. If you’re having any problem adding the application, check out a detailed explanation from Greg Finn on Customizing the Facebook Page.

Once the FBML Application is added, you can use it to create new tabs and boxes. Just click on Edit next the FBML box and now you can name your tab/box at the top and insert your HTML code at the bottom.

Edit-FBML

Here you can design and build your layout using regular HTML. It can be as simple as inserting one big image, or building a mini-website.

A few things to keep in mind when working with this application:

1. The max width should be around 750px.

2. Some people find it easier to use table layouts here as they are nice and compact. However, if you’re a CSS stickler who absolutely hates tables, you can use a CSS-based layout.

3. CSS code is allowed. There are a few ways to get it in there. You can either:

  • Use CSS at the top of the HTML by including it inside the <style></style> tags
  • Use inline CSS within each element by using style attribute, like: <div style=”CSS here”>
  • There is a way to reference external stylesheet by following Facebook rules on including files. You would need to specify a version number, which is a bit unusual.

Facebook will rewrite some CSS while rendering so that only elements within your box are affected and not the entire Facebook template.

4. You can include flash files as well. If you’re into flash design, you may just be looking for a way to embed a flash file using this application. You can do so by using the following FBML Code template:

<fb:swf  swfsrc=’http://www.yoursite.com/flash/flash-file.swf’ imgsrc=’http://www.yoursite.com/images/flash-image.jpg’ width=’650′ height=’408′ />

The way FBML includes flash files is that you first need to display an image. Once the user clicks on the image, the flash file then starts to play. In the code above, you need to specify the location of the flash file and the image (as well as width and height). The image can be a screenshot of the flash or a separate intro image; it’s up to you.

5. Image and File Hosting: It’s probably best if all images and other files are hosted externally. If you have a company website already, just host your images on that server. If not, you can look into getting some free file hosting.

6. Image bug fix in Firefox: One small, but annoying thing that I noticed is that some images can have unwanted space in between them in Firefox, which happened to me only when rendered through Facebook (and looked fine on a regular website). This can be especially annoying if your layout consists of images that need to be blended together.

I used the following CSS trick to fix the problem (inside <style> tag):

img {
display:block;
}

Just make sure that rule does not interfere with any other CSS you may have or cause any problems.

7. No javascript or other scripting languages are allowed – so just use HTML/CSS and, of course, FBML.

Finally, once you save the page, it will create the new tab and a box under the Boxes tab. This seems a bit redundant to me, so you can then delete the box itself or the Boxes tab altogether and just leave the Tab. Then you can also drag your new Tab to position it; whenever makes sense.

You can also add additional Tabs/Boxes by clicking on ‘Add another FBML Box’ at the bottom of the FBML Edit page.

Bookmark this post:

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

30 Responses to “How to Create Rich HTML Tabs on Your Facebook Page”

  1. Karen Clark on December 2nd, 2009 4:52 am

    Thanks for this, I have been trying to tweak out some custom tags using html but it isn't "taking" and it's frustrating. Do you know of any other "rules" I may be breaking such as length of lines of code or…? Every time I paste code in, it truncates it and doesn't take. So I shorten it, delete some stuff, and still it shortens it for me. LOL Using plain html, with tables, removed java and any other funkiness, not sure what's up. Thanks for posting though, it's gotten me to move on something I've been meaning to do. Just wish it were simpler! :)
    Karen

  2. Travis on December 2nd, 2009 5:32 am

    Awesome… learned something else new today!

  3. james on December 2nd, 2009 7:36 am

    didn't realize you can use HTML to this extent on Facebook. thanks for the heads up!

  4. Noel Wiggins on December 2nd, 2009 2:24 pm

    I came across a client that needed a custom facebook page I found on twitter, and as a designer I thought sure how hard could it be.

    This FBML extension really saved the day!

    Thanks and Regards

    Noel for Nopun.com
    a graphic design studio

  5. victor_10e20 on December 2nd, 2009 3:01 pm

    Hi Karen,

    I'm not really sure what you mean by 'tweak out some custom tags'.

    I'm not aware of any limit on the length of code. Did you try to test it with some very small HTML code first to see if that works?

    I suspect that there is some problem with the code you're trying to paste.

    In any case, you can try to ask some detailed questions on the 'Static FBML' Discussion page: http://www.facebook.com/apps/application.php?v=ap...

    Hope that helps

  6. victor_10e20 on December 2nd, 2009 3:01 pm

    Hi Karen,

    I'm not really sure what you mean by 'tweak out some custom tags'.

    I'm not aware of any limit on the length of code. Did you try to test it with some very small HTML code first to see if that works?

    I suspect that there is some problem with the code you're trying to paste.

    In any case, you can try to ask some detailed questions on the 'Static FBML' Discussion page: http://www.facebook.com/apps/application.php?v=ap...

    Hope that helps

  7. Janitorial Services on December 2nd, 2009 8:24 pm

    Many Thanks for very nice blog..

  8. Sarge on December 3rd, 2009 6:07 am

    Awesome tutorial. My FB page is something I really want to work on in the upcoming weeks and this is something I will come back as a reference to later!

    Thanks for the killer tutorial :)

    Sarge | BeginnerBlogger.com

  9. Flamex on December 3rd, 2009 4:26 pm

    Fantastic post, thanks for the eye opener. Something I can really do with in offering Social Media to clients in the overall online marketing strategy. This is a new opportunity to really be creative and bring out and really customise fan pages, and build a brand.

    Any creative marketing, branding, promotion ideas of how to take advantage of these HTML tabs anyone?

  10. Michael Sherman on December 3rd, 2009 2:06 pm

    Very Good Article

  11. Nick Coffee on December 3rd, 2009 7:51 pm

    Thank God I twitter as I saw this link there. Just setting up a company and had hoped to use Facebook as a marketing tool – this is a great help

    Thanks

    Nick
    Seagrass Baskets

  12. SOS Weekly Recap in Search 11/30/09 | StayOnSearch on December 4th, 2009 1:06 pm

    [...] 10e20: How to Create Rich HTML Tabs on Your Facebook Page [...]

  13. Steffan Antonas on December 8th, 2009 5:02 am

    This little style hack saved my life. I could not figure out what the heck was going on with firefox. I owe you a drink if we ever meet.

    "img {
    display:block;
    }"

  14. The Best Of The Best: Facebook Marketing | KRISTY BOLSINGER on December 8th, 2009 12:36 pm

    [...] How To Create Rich HTML Tabs on Facebook [...]

  15. Jack on December 16th, 2009 7:50 pm

    What about embedding RSS into a FBML tab? What's the easiest way to go about doing that?

  16. Karen Clark on December 16th, 2009 8:01 pm

    Thank you! I got it to work, I had some extra heading tags that were inserted by Dreamweaver. Once I deleted everything except what was from in the actual body tags it worked!!! Thanks!

  17. Anna on December 29th, 2009 9:29 am

    I'm not a professional programmer and that's why your article was interesting for me. It looks like a detailed guide for those who are to some extend new to html – like me. Thanks a lot:)

  18. Glenn on December 30th, 2009 9:27 am

    Check out some interesting stuff you can do on your Facebook Fan page.
    Steps & code provided.
    Click on "Fan Page Utilities" tab and become a fan to check out the contents of the page.

    If you have seen some interesting features been implemented please do share it with us.

    http://www.facebook.com/webwhispers?v=app_6009294...

  19. Best Internet Marketing Posts of 2009: Social Media, SEO, PPC, Small Business, Web Design, and More » Techipedia | Tamar Weinberg on January 5th, 2010 9:08 am

    [...] How to Create Rich HTML Tabs on Your Facebook Page (10e20): I know Jesse just contributed an awesome article on this blog but Victor’s guide here is also pretty good. [...]

  20. Best Internet Marketing Posts of 2009: Social Media, SEO, PPC, Small Business, Web Design, and More » Techipedia | Tamar Weinberg | Business-Blog-Consultant on January 6th, 2010 1:58 am

    [...] How to Create Rich HTML Tabs on Your Facebook Page (10e20): I know Jesse just contributed an awesome article on this blog but Victor’s guide here is also pretty good. [...]

  21. Eigenen Tabs auf Facebook Seiten : pixelblog on January 8th, 2010 2:54 pm

    [...] ich das alles weis? Nun, 10e20.com beschreibt das auf Englisch und etwas detaillierter searchengineland.com … und auch bei [...]

  22. Beste Internet Marketing berichten van 2009 « Narrowcasting & Digital Signage weblog on January 12th, 2010 9:37 am

    [...] How to Create Rich HTML Tabs on Your Facebook Page (10e20): I know Jesse just contributed an awesome article on this blog but Victor’s guide here is also pretty good. [...]

  23. Lucy on January 13th, 2010 1:39 pm

    This is fantastic. Thanks for taking the time to share it :)

  24. IDEE JSC on January 18th, 2010 3:48 am

    Great! Thanks!

  25. Avi on January 22nd, 2010 1:01 pm

    Hi Peeps
    here i am someone with no clue what I'm doing lol
    i know what i want is possible
    just no clue how any help would be greatly appreciated

  26. Jeromy Clark on January 25th, 2010 3:26 am

    MySpace- too easy. MyYearbook- piece of cake! Ning- not a problem…

    But I have been wondering what I can do about my Facebook page for the longest time- Thank You.

    Until now, I was oblivious to this app. I gotta go do this.

  27. Oz Guest on February 2nd, 2010 4:36 am

    I have added the custom tabs – which is GREAT. But I am totally new to html code. I just want to add images in the new tabs that link to an external url. Can you help me??
    Thanks!

  28. ichan_guest on February 2nd, 2010 5:51 pm

    Just wanna say thank you for the super-helpful tutorial =)

  29. Banks Beer on February 24th, 2010 1:18 pm

    i've been wondering the same…i feel like such a blonde. I pasted the html for my website and nada :-( i'm not sure what i'm doing wrong

  30. Manish on March 15th, 2010 6:32 am

    thanks sir ..
    it is superb.. :)
    keep it up …

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!