## Editing Attributes

You can edit attributes in two ways:

- Using the Attributes tool.
- Directly in the Structure view.

### Editing Attributes Through the Attributes Tool

The Attributes tool can be used to create an attribute, change the value of an existing attribute, or delete an attribute. It displays:

- The list of attributes already applied to the first selected element and their current value. mandatory attributes are displayed in red and cannot be removed.
- Below, all attributes that may apply.

To insert an attribute:

1. Click within the element and press the `F2` key to select the whole element.
2. When the element is selected, select the attribute name of the attribute you want to add in the Insert list. This attribute is now activated.
3. For boolean attributes (such as ismap for an image), the command is finished.
4. For attributes with a limited set of values (such as lang), you have to select a value in the list of possible values.
5. For other attributes you have to edit the value, then confirm either with the `Enter` key or with the apply button ().

To change the value of an attribute:

1. Click within the element and press the `F2` key to select the whole element.
2. Once the element is selected with this active attribute, click on the entry name to display the editing form of this attribute value.
3. For attributes with a limited set of values (such as lang), Amaya displays:
   - A combo box giving the list of possible values.
   - A delete button () to remove the attribute.
4. For attributes with a free value (such as href for an anchor), Amaya displays:
   - An input box to insert the value.
   - An apply button () to confirm the inserted value. The `Enter` key also confirms the inserted value.
   - A delete button () to remove the attribute.

To remove an attribute:

1. Click within the element and press the `F2` key to select the whole element.
2. Once the element is selected with this active attribute, click on the entry name to display the editing form of this attribute value.
3. Click on the delete button () to remove the attribute.

### Editing Attributes in the Structure View

All attributes are displayed in the Structure view. Attributes may be displayed in blue or pink. When the attribute value is displayed in blue, you can only change it with the Attributes tool. This ensures that only one of the correct values is chosen.

Attributes with a free value can be edited in the Structure View.

- You can click within the attribute value (displayed in pink) and edit the value like any other character string.
- To select the whole value, you can click within the value then hit the `F2` key.
- To remove the attribute, you can select the whole value, then press the `Delete` key twice. The first `Delete` will remove the attribute content and the second will remove the attribute.

### Copying Attributes

An attribute is not the same thing as element and an attribute cannot be copied by the Copy/Paste options on the Edit menu. Only a textual attribute value can be copied/pasted.