# Using JavaScript Syntax Coloring

JavaScript Syntax Coloring can be applied to JavaScript code within a PHP file or a JavaScript file.

To enable JavaScript syntax coloring:

Enter the relevant JavaScript tags:

Any code enclosed in the JavaScript tags will have Syntax Coloring applied to it, according to the configuration in the JavaScript Syntax Coloring Preferences page

### JavaScriptSyntax Coloring Configuration

JavaScript Syntax Coloring options can be configured from the JavaScript Syntax Coloring preferences page.

To configure JavaScript Syntax Coloring options:

1. Go to the JavaScript Syntax Coloring preferences page, accessed from Window | Preferences | JavaScript | Editor | Syntax Coloring.
2. Select the required item from the Syntax element list.To enable Syntax Coloring for the element, ensure the "Enable" checkbox is marked.
3. Select a color to apply to the text.
4. Select what formatting, if any, you would like to apply to the text (Bold, Italic, Strikethrough, Underline).

#### Note:

The Sample text box displays a preview of the different elements.

Click Apply and OK to apply and save your settings.

#### Related Links:

- JavaScript Support
- Developing with JavaScript
- Syntax Coloring
- Enabling JavaScript Support in PHP Projects
- Setting the JavaScript Build Path