##### 22.4.6.1 Providing meta content with paragraph formats

When you assign the Meta property and a <meta> tag name attribute to a paragraph format, the text of such a paragraph becomes a <meta> tag content attribute for the specified <meta> tag:

    [HTMLParaStyles]
    ParaFmt = Meta

Explicitly assigning the Meta property to a paragraph format is optional when you assign a tag name to that format in the following section:

    [StyleMetaName]
    ; doc style = name to use for meta tag whose content is the para text
    ParaFmt = metaname

For example, suppose you use paragraph format Metakeys to supply content for the keywords attribute:

    [StyleMetaName]
    Metakeys=keywords

With this setting, the text of every Metakeys paragraph would become content for a “keywords” <meta> tag in the <head> element of the HTML file. For example, if the text of a Metakeys paragraph is “staff, location, reporting, roster”, the <meta> tag would look like this:

    <meta name="keywords" content="staff, location, reporting, roster">

You need a different paragraph format for each <meta> tag. For example, if you want author and source tags, you might define paragraph formats MetaAuthor and MetaSource, and map them as follows:

    [HTMLParaStyles]
    Meta*=Meta Delete

    [StyleMetaName]
    MetaAuthor=author
    MetaSource=source

The Delete property prevents the content of these special paragraphs from appearing in body text; see §30.2.6 Eliminating unwanted paragraphs.

Previous Topic: 22.4.6 Supplying content for the <meta> tag

Next Topic: 22.4.6.2 Providing meta content with DITA PI markers

Parent Topic: 22.4.6 Supplying content for the <meta> tag

Sibling Topics:

22.4.6.2 Providing meta content with DITA PI markers

22.4.6.3 Providing meta content with DITA2Go macros

Table of Contents • Index