Adding the DOCTYPE Declaration to Generated Topics

You can add the DOCTYPE declaration to topic files when you generate online output. This allows browsers to render the topics in strict mode. If you do not select this option, generated topics will not have this declaration and will be rendered by browsers in quirks mode.

Quirks mode and strict mode have to do with the evolution of web browsers and the rules they use to interpret styles in cascading stylesheets (CSS). Quirks mode follows the old rules, and strict mode follows the new rules. If you are not concerned about which mode is used for your online output, you do not need to add the DOCTYPE declaration to topics. However, if you want to ensure that your output is interpreted and displayed using the newer strict mode, you should use this option.

Why use the DOCTYPE declaration? You might find the need to use the DOCTYPE declaration feature if you have text boxes, images, tables, or other objects that have float, margin, or padding settings applied to them. With settings such as this, you might notice slight alignment issues when generating online output. For example, margin or padding settings might be pushing aligned text a bit further than you want. To fix this, add the DOCTYPE declaration to the target. For more information about document structure, see:

Copy
http://www.w3.org/TR/REC-html40/struct/global.html

How to Add the DOCTYPE Declaration to Generated Topics?

  1. Open a target used for online output.
  2. On the Advanced tab of the Target Editor, select Add DOCTYPE declaration to generated topics.
  3. Click Save the active file. to save your work.

Note Enabling this feature for HTML Help targets may be necessary to avoid certain custom JavaScript errors. However, for some languages (e.g., right-to-left, Russian, Asian languages), this option may not function properly in HTML Help. Therefore, it is recommended that you disable the option for non-English language content when generating HTML Help.

Note The DOCTYPE declaration will exist in the main output file whether or not this option is enabled.