Skip to content

Headlines in HTML export ​

Headlines are exported to ‘<h1>’, ‘<h2>’, etc. Each headline gets the ‘id’ attribute from ‘CUSTOM_ID’ property, or a unique generated value, see Internal Links.

Headlines can contain a link to themselves. To enable it, you can:

  • Set the variable org-html-self-link-headlines to a non-nil value
  • In an Org file, use html-self-link-headlines option
    orgmode
    #+OPTIONS: html-self-link-headlines:t

When enabled, the text of the headlines is wrapped in ‘<a>’ tags. These tags have a ‘href’ attribute making the headlines link to themselves.