Many browsers look in the root directory for a file named "favicon.ico", so often you don't even need any HTML code but just put the file there:
http://g-b.dk/favicon.ico (if "g-b.dk" is your website)
and you can even "overrule" this in subdirectories if you have a different file placed in
You can also use one of these code snippets to specify the icon in HTML:
[color=#CC0000]Get $50 off[/color] with promo code "LESS"! See here what else you get!