For detailed information and instructions, click the links below.
Before you tag page items, create (or load) tags to identify each content type or item in your document. You can create tags from scratch or load them from another source, such as an InDesign document, InCopy document, or DTD file. Use any of the following methods to create or load XML tags for your document:
Create a tag with the New Tag command.
Load tags from an XML file or another document.
Import a DTD file.
Import tags (and content) using the Import XML command.
Choose New Tag from the Tags panel menu.
Click the New Tag button on the Tags panel.
You can assign the same color to different tags. The color you select appears when you apply the tag to a frame and choose View > Structure > Show Tagged Frames, or when you apply the tag to text within a frame and choose View > Structure > Show Tag Markers. (Tag colors do not appear in exported XML files.)
You can load tags from an XML file, an InDesign document, or an InCopy document.
InDesign automatically adds tags to the Tags panel when you load an XML file.
You cannot change the name of locked tags. InDesign automatically locks tags specified in a loaded DTD file. To change the name of these tags, you must edit the DTD file and reload it into the document.
Before you export content to an XML file, you must tag the text and other items (such as frames and tables) that you want to export. You also need to tag items that you have created as placeholders for imported XML content. Items that have been tagged appear as elements in the Structure pane.
Create (or load) tags to identify each content element that you want to export or import. Then tag text or page items using one of these techniques:
Select a frame or text, and then click a tag in the Tags panel, or simply drag a tag from the Tags panel to a text or graphics frame.
Select a text frame, table, table cells, or image, and then click the Autotag icon in the Tags panel. Items are tagged according to your tagging preset options.
Map tags to styles
Associate tags with paragraph, character, table, or cell styles, and then apply tags automatically to text, a table, table cells, and paragraphs that were assigned those styles.
When tagging page items, note the following:
You can apply tags to stories as well as to text within stories. For example, you might want to apply an Article tag to a story, and then apply more specific tags, such as Title and Body, to paragraphs within the story.
You can apply only one tag to a story. When you tag a frame in a threaded story, all other frames in the story, along with any overset text, are assigned the same tag.
You can apply only one tag to a graphics frame. When you tag a graphics frame, InDesign records a reference to the graphic’s location (on disk).
You cannot tag a group of objects. To tag an item that’s part of a group, use the Direct Selection tool to select the item.
When you tag text within a tagged element (such as a paragraph within a story), it appears as a child of the existing element in the Structure pane.
You can tag text or images on a master page, but only one instance of the corresponding element appears in the Structure pane regardless of how many times the item appears on document pages. However, if you manually override a master item and then tag it on a document page, the item will appear as a separate element in the Structure pane.
You can’t tag a footnote.
Avoid tagging special characters, such as the Automatic Page Number character. When exporting, InDesign strips out some special characters to comply with XML standards. InDesign warns you when characters cannot be encoded in XML.
You can tag frames by using any of these methods.
If a frame is part of a group or nested within another frame, use the Direct Selection tool to select the frame.
When you tag text within a frame, the new element appears in the Structure pane as a child of the frame element in which the text is located.
You can’t tag footnotes.
By clicking the Autotag icon in the Tags panel, you can tag a text frame, table, table cells, or an image automatically. To tag the item, InDesign applies a default tag that you specify in the Tagging Preset Options dialog box.
InDesign adds the default tag’s name to the Tags panel after you click the Autotag icon.
Paragraph styles and character styles you assign to text can be used as a means of tagging paragraphs and text for XML. For example, a paragraph style called Caption can be associated with a tag called FigureName. Then, using the Map Styles To Tags command, you can apply the FigureName tag to all text in your document assigned the Caption paragraph style. You can map more than one style to the same tag.
The Map Styles To Tags command tags content automatically, including paragraphs and characters that are tagged already. For example, if a paragraph assigned the Context style has been tagged with the Body tag, but you then associate the Context style with the Expository tag, the paragraph is retagged; it is stripped of the Body tag and given the Expository tag instead. If you want to retain existing tags, apply tags manually (or use the Map Styles To Tags command very carefully).
Master Page Stories
Maps styles found on master page text frames to tags.
Maps styles found on text frames on the pasteboard to tags. (Deselect this option to avoid tagging content on the pasteboard.)
Maps styles located on empty text frames to tags. (Deselect this option to avoid tagging empty frames.)
The new XML tags are applied throughout your document to paragraph and character styles that you specified in the Map Styles To Tags dialog box.
You cannot tag images with the Map Styles To Tags command. You need to manually tag images if you want to include them in an XML file.
When you tag a table for XML, you create a table element as well as one cell element for each cell in the table. The cell elements are child elements of the table element, and are created automatically.
InDesign creates a cell element for each cell in the table (you can display them in the Structure pane). The tag applied to table cell elements depends on your Autotag default settings.
For example, you can tag the first-row cells with a different tag to identify them as heading cells. To apply tags to cells, select the actual table cells in your document, and then select a tag. (Selecting cells in the table also selects the corresponding cell elements in the Structure pane.)
You can also tag a table by selecting it and then clicking the Autotag icon in the Tags panel. The Table tag (or another tag of your choice) is applied immediately to the table, according to your Autotag default settings.
Untag an item to remove its tag but retain the associated content.
Retag an item to replace the existing tag (you don’t need to untag it first). Use one of these techniques to retag an item:
When you select a text frame, table, table cells, or an image, and then click the Autotag icon in the Tags panel, InDesign applies a default tag to the item you selected. You can specify these default tags in the Tagging Preset Options dialog box.
InDesign applies a default tag when you create an element that requires a parent element, but doesn’t yet have one. For example, if you tag text within a text frame but the frame itself isn’t tagged, InDesign assigns the frame a tag according to the Tagging Preset Options. The capability to apply default tags helps InDesign maintain correct XML structure.
If the tag you need isn’t listed, you can choose New Tag from the menu and create a tag.
Tag markers are brackets that appear on the page around text that has been tagged. Show tag markers to see where titles, headings, and other text has been tagged on a page. Tagged frames indicate where items such as text frames, tables, and images have been tagged. The color assigned to a tag in the Tags panel determines the color of tag markers and tagged frames. Tag markers and tagged frames only appear in Normal view.
To display color-coded tagged frames, choose View > Structure > Show Tagged Frames.
To hide the color-coding of tagged frames, choose View > Structure > Hide Tagged Frames.
To display color brackets around tagged text, choose View > Structure > Show Tag Markers.
To hide color brackets around tagged text, choose View > Structure > Hide Tag Markers.
To minimize the risk of accidentally deleting a tag marker, edit tagged text in Story Editor, where tag markers are more visible.
Tags that were loaded with a DTD file cannot be deleted until the DTD file is deleted.