## Editing attributes

There are two ways to edit attributes:

- the Attribute menu,
- the Structure view.

### Editing attributes through the menu Attributes

The Attribute menu lists all attributes that can be associated with the selected element. It can be used to create an attribute, to change the value of an existing attribute or to delete an attribute.

To edit an attribute, first select the appropriate element. You must select the entire element, not simply a character within the element; use the Esc key (on Unix platforms) or F2 key (on Windows platforms) for this. When the element is selected, choose the attribute to be edited from the Attributes menu. Then Amaya acts according to the chosen attribute:

- If it is a boolean attribute (such as `ismap` for an image), the command is finished. Choosing that attribute in the menu removes it from the selected element, if it is present, or adds it if not.
- If is is an attribute with a limited set of values (such as `align` for a paragraph or a heading), a dialog box pops up. It contains a menu of the available values and three buttons.
  - If you want to create this attribute or to change its value, choose the desired value from the menu and click on the Apply button.
  - If you want to remove that attribute, click on the Delete button.
- If it is an attribute with a free value (such as `href` for an anchor), a dialog box pops up. In this dialog box, you can edit the attribute value; terminate the command with the Apply button. To remove the attribute, click on the Delete button.

### Copying attributes

An attribute is not the same thing than an element and an attribute cannot be copied by Copy/Paste commands. To copy an attribute you need to use the Attribute menu. First you have to select the element which has the attribute you want to copy. You select the appropriate attribute entry in the menu Attributes. Then you select the new element to which you want to associate the current attribute and click on the Apply button.

### Editing attributes in the Structure view

All attributes are displayed in the Structure view. Attributes whose value can be chosen freely are displayed in black and you can edit their value like any other character string. When the attribute value is displayed in blue, you can only change it with the Attribute menu. This ensures that only one of the correct values is chosen.