Using code snippets

Code snippets are fragments of code or text that you can add to web pages and reuse as many times as you want. Microsoft Expression Web provides several pre-defined code snippets, and you can also create your own. You can associate a keyword with the code snippet for quick access and insertion.

Using code snippets can save you time. For example, if you frequently type blocks of script, you might start by inserting a pre-defined code snippet that 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.

<script type="text/jscript">
    <!--

    //-->
</script>

See also

Tasks

Create or modify a code snippet
Insert a code snippet

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.