Do you mean in a post or in bog template. In a post each type of blog has button for html. You need to add code in html for it to work.
Yeah. But be careful, some rich-text editors that blog programs use sometimes try to change the html markup which results in messing up javascript and other things. I usually turn off HTML editors when posting anything to my blogs with ads and stuff.