I would like to create something similar to fb: tag.
For example if you put fb:comments in your code it would display your comments from Facebook.
Ofcourse y
Its actually done by javascript (if you are talking about puting fb:... in html). All that you need to do is parse the DOM tree on load of document for particular tag/prefix and process as needed. You can use jQuery or dojo etc for complex queries. Same concept used in dojo for widgets but with custom attribute on tag.
<button data-dojo-type="dijit.form.Button" type="button">