What HTML can you customize?

The link provided by Simon explains everything, but it’s quite long to read.

Basically, if you want to edit Discourse HTML, this can be done several ways:

  1. Through some pre-defined HTML tabs in your theme or component : Header, After Header, </body>, Footer.
  2. By targeting a “free” HTML space (outlet) that you can fill with your own HTML This can be done via a <script> tag that you can add in the </head> tab.
    Here is an example of the available outlets in a topic view:
  3. By overriding an existing HTML template. Templates sometimes contain a lot of HTML code, and you’ll need to copy-paste all of it in order to do your modifications. This can also be done in a <script> tag added in your </head>

Creating a theme, a theme component or “simply editing my single forum”, is quite the same here actually. The three are more or less done the same way.

Yes, it depends what you wan to do exactly, but usually the right way is creating a new theme component and write the HTML/CSS in here.