How can I add classes or IDs to elements in Redactor?
For images and links, see Image Styles and Link Styles.
Custom formatting can be used to add styles, classes and attributes on a variety of elements.
To add IDs or classes to any block element, use the properties plugin.