Also, anything dynamic that you put in an html attribute should be run through esc_attr() first. That will prevent it from having quoting problems and other such things.