### 22.9 Providing hover text for links in HTML

Hover text in HTML is produced from the value of the HTML title attribute of a tag (usually a <span> tag) that encloses the term. The attribute value may not contain a carriage return, nor the symbols <, >, ", ', or &.

DITA2Go provides mouseover hover text for all cross references and links to topics in your DITA source, including those added by @keyref, internal scope only:

- For links to topics the hover text is the content of the <shortdesc> or <abstract> element; if neither is present, the link has no hover text.
- For <glossentry> topics, the hover text is the content of the <glossdef> element; links are still present and active, if (for example) a user wants more detail.
- For a cross reference to a section or figure or table, the hover text is the title, and any autonumber would be included also.

If an element has an @href attribute either because of the element type (such as <xref>) or because it has a @keyref to a <keydef> with an @href, DITA2Go can use the reference for HTML title attribute text. The exceptions are:

- external and peer scope, where DITA2Go cannot access the other end of the @href
- references to elements that lack titles, where the text to use is not necessarily clear.

No special settings are needed to enable hover text for DITA links and cross references.

Previous Topic: 22.8 Importing HTML files as insets

Next Topic: 22.10 Generating XHTML for Confluence 4.x

Parent Topic: 22. Converting to HTML/XHTML

Sibling Topics:

22.1 Deciding which type of output to produce

22.2 Setting up an HTML project

22.3 Including starting code and entity references

22.4 Supplying values for the <head> element

22.5 Specifying HTML <body> attributes

22.6 Specifying document-wide properties for HTML

22.7 Defining text colors for HTML

22.8 Importing HTML files as insets

22.10 Generating XHTML for Confluence 4.x

22.11 Exporting content for database input

22.12 Specifying a starting topic for HTML or XHTML

22.13 Using framesets

22.14 Passing W3C validation tests

Table of Contents • Index