How to Create or Modify a Code Snippet

When you want to quickly insert code that you often use, you can create a code snippet for that code. You can also modify or delete the code snippets that you've created or the code snippets that are provided by Microsoft® Expression® Web.

To create or modify a code snippet
  1. On the Tools menu, click Page Editor Options.
  2. In the Page Editor Options dialog box, on the Code Snippets tab, do one of the following:
    • To create a code snippet, click Add.
    • To modify a code snippet, click the code snippet you want to edit, and then click Modify.
  3. In the Add Code Snippet or Modify Code Snippet dialog box, do the following:
Choices in the Add Code Snippet or Modify Code Snippet dialog box
Use this: To do this:
Keyword Type a unique word for the code snippet, which you can subsequently type to select the code snippet in the list of code snippets.
Description Type a description to identify the code snippet.
Text Type the code that will be inserted when you select the code snippet.
To delete a code snippet

On the Tools menu, click Page Editor Options. In the Page Editor Options dialog box, on the Code Snippets tab, click the code snippet you want to delete, and then click Remove.