Add attribute
The Add Attribute refactoring allows you to add attributes with the specified name and value to tags with the selected tag name. Optionally, you can specify whether you want the new attribute added always or only to tags that do not have it yet. This bulk addition of attributes is useful as XML schemas evolve.
Add an attribute
Place the caret at the tag to add an attribute to, press Ctrl+Alt+Shift+T, and then select Add Attribute from the list.
In the dialog that opens, type the name and the value of the attribute to be created inside the selected tag and specify the scope to add the attribute in.
With the Directory scope specified, select the Recursively checkbox to include sub-directories.
Select the Limit to files with DTD:... checkbox to limit the scope to the files with the same
DOCTYPEas specified for the current file.
Specify what to do if the newly created attribute already exists in a tag.
To skip tags that already have attributes with the specified name, select the Add attribute only if absent checkbox.
To have attributes with the specified name and value added anyway and thus overwrite the existing values, clear the Add attribute only if absent checkbox.

Invoke the refactoring:
Click OK to continue immediately or click Preview to have WebStorm show the usages of the selected tag in the Find tool window where you can mark usages as included in or excluded from refactoring.
Click Show XSLT... to view a fragment of the XSLT that is equivalent to the requested refactoring. This fragment can be used by XSLT processors to perform the requested refactoring on files outside your WebStorm project.