About code snippets

Microsoft Office FrontPage 2003

Show All Show All

About code snippets

A code snippet is a fragment of code or text that you can define and reuse many times. Microsoft FrontPage provides several pre-defined code snippets, and you can also create your own. You can associate a keyword to the code snippet for quick access and insertion.

Using code snippets can save you time. For example, if you frequently type blocks of JavaScript, you might start by inserting the following pre-defined code snippet:

<script language="JavaScript">
<!--

//-->
</script>

The preceding example contains start and end tags, HTML comment delimiters which hide the script from browsers that may erroneously display the code instead of rendering it, and an empty line in which to type the actual script.

Some additional ideas for code snippets include:

  • CSS style blocks
  • Frequently typed content
  • hexadecimal color values