Skip to main content
Legend
September 24, 2025
Question

How to enter a bookmark intended for HTML output

  • September 24, 2025
  • 1 reply
  • 135 views

Hi. Using ID 20.5 under Win11.

Maybe I'm not seeing something that's directly in front of me. I need to use ID to output existing documentation as a set of HTML pages. (So I'm clear, we're not dealing with fancy stylistic high-concept web page development, here. It's a lot of text and a few graphics.). In those HTML pages, I need to embed bookmarks at specific places. Typically, a named bookmark in HTML looks like:

<p id="fubar-function">Let's talk about the Fubar Function.</p>

 

I'm able to create both a named text anchor and a named hyperlink destination in the ID source doc, but they don't seem to show up in the HTML output. For example, when I mark the very first word in some Lorum Ipsum text as both (that is, as both a bookmark and a hyperlink destination, just to be sure I have the bases covered), output that text as HTML5, and then display that text in an HTML editor, I see the first word -- the word I have marked -- of the Lorum Ipsum as:

 

<p class="_00-x-600-H_Paragraphs_paragraph-ROP ParaOverride-1">

<span id="_idTextSpan006" class="CharOverride-3" style="position:absolute;top:691.59px;left:0px;">

Andis

</span>

 

The named destination and the named bookmark appear nowhere. The id that does show up... well EVERY SINGLE WORD has an id assigned by InDesign. Any suggestions here? What am I not doing or not seeing? I need to put bookmarks into the HTML at specific locations so that the software developers can link to specific places in my doc from the web app they're building. I therefore need to be able to supply them with the id codes for the bookmarks they need to link to. Could I give them the randomly-generated word-for-word ids that InDesign generates...? Could I manually insert my own ids...? I could. It wouldn't be efficient, though, nor survive revision. And picking word by word through an entire book to place these ids would be exhausting.

 

Before the expected comments show up, I fully realize that ID is not a web development package. However, as I mentioned, I'm not trying to produce a "fancy website" with handsome interactive features. I am only trying to output existing techical documentation. ID can produce a decent ebook (which itself is HTML code)... but apparently cannot produce HTML code proper from a relatively simple document. This is one of the reasons I think I'm missing something. I will note with alarm that ID wraps each individual single word in the entire document, one-by-one, rather than grouping them in the paragraphs they were born in. That just cannot be efficient. A browser has to interpret all that.

 

And I still don't know how to insert a named bookmark...

 

I have looked at the In5 add-in and it is very impressive... but does anyone know if it produces the same inefficient word-by-word wrapped output that InDesign does? If I give him that level of inefficiency, the project manager will have my skin.

 

Thanks as always to the community.

-j

 

1 reply

Community Expert
October 2, 2025

Hi j

You’re not missing anything InDesign’s HTML export is very limited. It was never built to give clean, developer-friendly HTML with custom IDs or anchors. What you’re seeing (every word wrapped in a <span> with inline styles and random IDs) is unfortunately “as designed.” InDesign is positioning text for layout fidelity, not efficient markup.

 

Bookmarks / Hyperlink Destinations: these will carry across to PDF or EPUB, but not HTML export. InDesign simply doesn’t convert them to <a id="..."> tags in raw HTML.

 

Workarounds:

  • Export as EPUB, then edit the HTML files manually (anchors survive better there).
  • Export as HTML, then run a post-processing script (for example, a search-and-replace batch to insert meaningful IDs where you need them).
  • Use a plugin like In5 (which gives more control), though yes, even In5 tends to generate verbose markup since it’s still about preserving layout.
  • For large structured docs, you might be better off authoring in something like FrameMaker, MadCap Flare, or even Word + conversion tools, which are designed for documentation to web.
  • If you hand the developers those random per-word IDs, it’ll be a nightmare to maintain. A scripted clean-up step after export is usually the most efficient way.

So in short: InDesign can give you content, but if you want clean anchors you’ll need an extra step outside InDesign.