You are here: Doc-To-Help Markup Language (D2HML) > D2HML Formatting Rules > Using the D2HML Attribute in HTML Source Documents

Using the D2HML Attribute in HTML Source Documents

The d2hml attribute is a special attribute that can be used in your HTML source documents to keep the secondary part of a hot spot, which contains all of the D2HML properties for the hot spot, from appearing as text in the design view of your HTML editor. It can also be used to specify a hot spot on HTML elements that are not allowed to have text, such as the <AREA> tag.

For example, here is how a topic link with the D2HML property Tag set to a specific topic appears in the design view of your HTML editor:

In HTML code, this sentence looks like this:

You can keep the secondary part from appearing in the design view by using the d2hml attribute. In HTML code, the same sentence looks like this:

In the design view of your HTML editor, it appears without the secondary part:

Here is a Topic Link.

The d2hml attribute can also be used to specify the D2HML hotspot style without changing the class attribute of an HTML element. The value of the d2hml attribute must start with the style name followed by the secondary part, separated by a separator bar ( | ), as in the following example:

This allows you to keep the class, myclass, which may be used for appearance purposes, while converting the HTML element into a D2HML hot spot. The secondary part does not appear in the design view of your HTML editor.

When using the d2hml attribute, the style name, C1HJump in the previous examples, must exactly match the value of the HTMLName property of a character style in the Doc-To-Help project. In Doc-To-Help, the value of the HTMLName property for C1H Jump is .C1HJump. Note that you do not need to include the leading period in the d2hml attribute. If the value of the HTMLName property includes a tag name, such as SPAN.MyStyle, the tag name must be used in the d2hml attribute as in the following example:

Hot spot properties are stored in the d2hml attribute by default, unless you are creating one of the invisible hot spot types. In this case, properties are stored as text in your HTML document.

Most D2HML dialog boxes contain a More button that, when clicked, displays additional properties for the hot spot. Properties in Attribute is checked by default. If you do not want the hot spot properties to be stored in the d2hml attribute, select Properties in Text.

Note: If using Dreamweaver, you can choose to show or hide the hot spot properties in your document. To hide them, select Hide Properties in Document. Hot spot properties are always hidden in FrontPage, so this checkbox is not available in the D2HML dialog boxes for FrontPage.