# Buttons and Types Menu

The commands on the Xhtml and Xml menus, and the corresponding buttons, let you create new elements at the insertion point within the document. To use the commands from the Xhtml and Xml menus, place the cursor at the desired position and choose the element type from theXhtml and Xml menus.

## Insertion points

When creating new elements, it is important to select an insertion point, not some text nor a single character: if the current selection is not empty, Amaya tries to transform the selected part into the element type chosen.

## Element Locations

Sometimes elements cannot be created at the chosen chosen because of the constraints imposed by the HTML DTD. Amaya then tries to create the element at the closest position. For example, if the insertion point is at the end of the last line of a paragraph when you click on the Heading 2 button , Amaya creates the new heading after the paragraph.

In some other cases, Amaya changes the existing structure for creating the desired element. If the insertion point is somewhere within a list item (`li`) when you create a second level heading, the list item and its enclosing list are automatically split, in order to create the requested heading at the chosen position and to comply with the HTML DTD.

## See Also:

- How to use Element Types
- List of all HTML 4.0 elements