convert media to HTML 5 elements