Using your own HTML code fragment (HTML code fragment: HTML code that you add to your Web page to create features such as a script, a counter, or a scrolling marquee.), you can add objects, such as counters and
scrolling marquees, or scripts, such as VBScript, to your Web site. Code fragments are also available on the Web and from other sources, but you should be aware of the security risks outlined in the security note below if you use code from other sources.
- On the
Insert menu, click
HTML Code Fragment.
Note You must be in Web mode to view certain options specific to Web publications. You can determine whether you're in Web mode by looking at the title bar (title bar: A horizontal bar at the top of a window, dialog box, or toolbar that shows the name of the document, program, or toolbar.) of your open publication, which will display Web Publication if you're in Web mode.
- In the
HTML Code Fragment box, insert your
HTML code fragment by typing or pasting from another source over the entire
placeholder text.
- Click
OK.
Your HTML code fragment appears as code in a frame on your Web page, and
the result of your HTML code fragment appears when you preview or publish your Web
page.
Note If you want to view the HTML source code for a Web publication, click Web Page Preview on the File menu, and then click Source on the View menu.
Security If you use an HTML code
fragment
from an unknown source, it may cause performance or security problems for your
Web site. For example, your Web pages might not load properly. Publisher does not check HTML code fragments for accuracy or security. If you are copying and pasting an HTML code fragment that is not your own, make sure that it is from a trusted source.