##### 28.2.2.2 Assigning a link class with a paragraph format

You can cause all links in your document to inherit the class properties of the paragraphs where the links occur, or you can assign a CSS class to all the links that occur in paragraphs of a particular format.

To make all links use the same CSS class properties as their containing paragraphs:

    [CSS]
    ; LinkClassIsParaClass = No (default)
    ;  or Yes (adds the same class attribute as is used for
    ;  the current para to all links within that para)
    ;  Default is reversed to Yes if UseCSS=Yes.
    LinkClassIsParaClass=Yes

When you use CSS, the default value of LinkClassIsParaClass is reversed to Yes; see §31.5 Understanding how CSS affects other options.

To assign a class to the links in a particular paragraph format:

    [HTMLParaStyles]
    ; ParaLinkClass uses the name in [StyleParaLinkClass]
    ;  as the class attribute of the contained links; if none is
    ;  specified, it uses the same class as the para itself
    ParaFmt=ParaLinkClass

    [StyleParaLinkClass]
    ; doc style = name to use in the class attribute
    ;  of the links in the para
    ParaFmt=classname

A ParaLinkClass assignment overrides any LinkClassIsParaClass setting in [HTMLOptions].

For example, to assign CSS class traffic to all links that occur in text with paragraph format Blurb, and cause all links in Intro paragraphs to look just like the rest of Intro text:

    [HTMLParaStyles]
    Intro=ParaLinkClass
    Blurb=ParaLinkClass

    [StyleParaLinkClass]
    Blurb=traffic

A Blurb paragraph that contains a link would convert to HTML like this:

    <p class="blurb">Text containing a link to <a class="traffic" href="#">somewhere</a>.</p>

An Intro paragraph that contains a link would convert like this:

    <p class="intro">Text containing a link to <a class="intro" href="#">somewhere</a>.</p>

Previous Topic: 28.2.2.1 Assigning a link class with a PI marker

Next Topic: 28.2.3 Assigning link attributes with PI markers

Parent Topic: 28.2.2 Specifying link class

Sibling Topics:

28.2.2.1 Assigning a link class with a PI marker

Table of Contents • Index