#### 34.3.2 Assigning WAI link attribute values with dedicated formats

You can designate a paragraph format whose content will be the text for the following link. For example, suppose you use paragraph format Linkname for this purpose:

    [HTMLParaStyles]
    ; LinkTitle makes current para content into title attr for next link
    Linkname = LinkTitle Delete

In your DITA document, just before the link you would insert an element to which you have assigned format Linkname containing the name you want displayed for the link destination. The Delete property would exclude the paragraph (as such) from HTML output; HTML source would show the text of the Linkname paragraph as the value for the title= attribute of the <a> tag.

You can use a similar strategy to assign a CSS class to the next link. For example, to use paragraph format LinkCSS for this purpose:

    [HTMLParaStyles]
    ;  LinkClass makes current para content into class attribute
    ;   used to set the link display properties in CSS.
    LinkCSS = LinkClass Delete

The Delete property would exclude the paragraph from normal HTML text output.

Previous Topic: 34.3.1 Following WAI guidelines for links

Next Topic: 34.3.3 Assigning WAI link attribute values with PI markers

Parent Topic: 34.3 Applying WAI markup to links

Sibling Topics:

34.3.1 Following WAI guidelines for links

34.3.3 Assigning WAI link attribute values with PI markers