Types of HTML templates
There are two categories of HTML templates: The HTML topic page templates that define your topic pages in all HTML-based output formats and an additional group of HTML templates used to define the additional components of WebHelp output.
If you are publishing with a skin you must edit the templates in the skin, not in your project! Skins always replace all the HTML templates in your project. Changes made in HTML templates your project will not be reflected in your output when you use skins!
These are the templates for your topics and they are used for all HTML-based output formats. They define everything in your topic pages except the topic content. They are stored in Configuration > HTML Page Templates.
In addition to this there are also separate templates for the main index.html page and the Table of Contents, Keyword Index and Full-text Search pages used in WebHelp to emulate the HTML Help viewer user interface. These templates are stored in Configuration > Publishing Options > WebHelp.
The WebHelp Layout template contents depend on the layout option chosen
The "No Frames" option disables the Layout template
The layout template is not used at all if you choose the "No Frames" option. Then the Table of Contents template is set as the main index.html file and the contents of the layout template are irrelevant for your output because the template is not present.
HTML Topic Page templates are (almost) always used.
The topic page templates in Configuration > HTML Page Templates are used by almost all HTML-based output formats (CHM, WebHelp, EXE eBooks and Visual Studio Help 2008 and 2010). The Topic Page Template contains a script that automatically loads the full WebHelp user interface if a topic is opened on its own (for example from a search engine link) but you can turn this off if you want.
The WebHelp Table of Contents, Index and Search templates are always the same
The contents of the WebHelp Table of Contents, Index and Search templates remain unchanged no matter which layout option you choose. They are just loaded into different frames depending on your layout choice.
If you choose the "No Frames" option The TOC template is used as the main index.html file. It contains script that identifies whether it is loaded in a frame or on its own and responds accordingly.