Change font size of the output file

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Dec 19 19:48:08 UTC 2023


On 12/17/23 9:38 AM, Arbol One wrote:
> I would like to change the font-size, background-color, etc., of the 
> out put files created by JavaDoc, any suggestions as to how to go 
> about it?
>

If you are using a recent version of JDK to generate your API 
documentation, look at the top of the `stylesheet.css` file in the 
generated output. Looking at that, you can see the names and values of 
the default values that will be used.

You can override these default values by specifying an additional 
stylesheet on the `javadoc` command line, with the `--add-stylesheet` 
option. Any such stylesheet will be read after the system style sheet. 
So create your own stylesheet with a `:root` element that overrides the 
values that you want to change.

-- Jon



More information about the javadoc-dev mailing list