#### 22.4.5 Specifying page titles for HTML output files

You can specify page titles for an HTML output files any of these ways:

Assign a default or computed title

Use a heading paragraph

Use a DITA PI marker

Assign title text to the HTML file.

The text you supply becomes the content of the <title> tag in the HTML <head> element. For more information, see §27.5.2 Specifying page titles for split or extract files.

Note: If some of your output files show Test File from DITA2Go as the title, this means you did not manage to specify titles for those files.

Assign a default or computed title

To specify a default page title for all output files:

    [HTMLOptions]
    ;Title = default title for HTML files,
    ;  overridden by all other settings
    ;Title=Test File from DITA2Go
    Title=My default page title

You can assign a macro or macro variable to the Title keyword. For example, to use the base name of the DITA source file as the page title for each HTML file derived from that DITA file:

    [HTMLOptions]
    Title=<$$_basefile>

See §27.5.2.6 Assigning a default title.

Use a heading paragraph

The easiest way to provide HTML page titles is to assign the Title property to all paragraph formats (usually headings) that begin new HTML files. For example:

    [HTMLParaStyles]
    ; Title uses head as HTML page title, see [Titles]
    Heading2=Title

With this setting, every HTML output file that begins with a Heading2 paragraph would have the text of that paragraph for a page title. See §27.5.2.2 Assigning a title with a paragraph format.

Use a DITA PI marker

You can specify an individual page title with a DITA Title PI marker; the content of the Title marker becomes the title of the HTML file generated from the section of your document where you inserted the marker. See §27.5.2.5 Assigning a title with a marker.

Assign title text to the HTML file

You can provide arbitrary text for the title by assigning the text to the HTML output file name; for example:

    [Titles]
    ; html filename = title, overrides [HTMLParaStyles] Title setting
    m2r=DCL MIF2RTF Filter Description

You must assign the title text to the internal file name assigned by DITA2Go, not to any replacement name you may have specified for a split or extract file. See §27.5.2.4 Assigning a title with a file name.

Previous Topic: 22.4.4 Including or omitting HTML/XML generator information

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

Parent Topic: 22.4 Supplying values for the <head> element

Sibling Topics:

22.4.1 Specifying HTML/XML version, DOCTYPE, and DTD

22.4.2 Specifying namespace and language

22.4.3 Specifying character encoding for HTML

22.4.4 Including or omitting HTML/XML generator information

22.4.6 Supplying content for the <meta> tag

22.4.7 Specifying nonstandard values for declarations

Table of Contents • Index