WebStorm 2016.3 Help

Completing Tag Names

On this page:

Introduction

WebStorm automatically completes the names of tags, attributes and their values in files of the following types:

  • HTML/XHTML
  • XML/XSL

Automatic tag name completion is based on the DTD or Schema the file is associated with.

If there is no schema association, WebStorm will use the file content (tag and attribute names and their values) to complete your input.

In XML/XSL files, completion for taglibs and namespaces is available.

You can have WebStorm do one of the following:

  • Insert a declaration of the taglib the tag in question belongs to.
  • Import the desired taglib and insert all required import and reference statements.

Completing tag names

To invoke the tag name completion

  1. Press < and start typing the tag name. WebStorm displays the list of tag names appropriate in the current context. Use the ArrowUp and ArrowDown buttons to scroll through the list.
  2. Press Enter to accept selection from the list, or continue typing the tag name manually.

    WebStorm automatically inserts mandatory attributes according to the schema.

Inserting taglib declaration

To insert a taglib declaration

  1. Start typing the tag and press Ctrl+Alt+Space.
  2. From the list of matching tags, select the desired one. The uri of the taglib it belongs to is displayed in brackets.
    /help/img/idea/2016.3/tagCompletionBefore.png
  3. Select the desired taglib and press Enter. WebStorm adds the declaration of the selected taglib.
    /help/img/idea/2016.3/tagCompletionAfter.png

Importing a taglib declaration

To import a taglib

  1. Start typing the taglib prefix and press Alt+Insert.
  2. Select the desired taglib from the list of suggestions and press Enter.
    /help/img/idea/2016.3/import2.png

    WebStorm imports the selected taglib and adds the import statement automatically.

See Also

```

Procedures:

Last modified: 22 March 2017