IntelliJ IDEA 2024.1 Help

Export files to HTML

You can export entire files or selected code fragments to HTML.

  1. In the main menu, go to File | Export | Files or Selection to HTML.

  2. In the dialog that opens, select what you want to export: the current file, the selected piece of code, or all files in the directory that is currently selected in the Project tool window.

  3. Specify the directory to which you want to save the file.

  4. Configure additional options if necessary:

    • Show line numbers: adds line numbers in the HTML file.

    • Generate hyperlinks to classes: formats class names as hyperlinks to the respective classes.

    • Open generated HTML in browser: opens the generated HTML file in the default web browser.

  5. Click Export.

    Exporting file to HTML
Last modified: 08 May 2024