renderLogoFileAsHTML filename outputs a word containing HTML code, which the Logo editor created by styling the input file like it were any logo file. Example:
renderLogoFileAsHTML "box.lg to box repeat 4 [ fd 100 rt 90 ] rt 30 end ;-)