formats title text and image