Search code examples
javagradlebuild.gradlejavadocgradle-plugin

Font tag not supported in javadoc


Im using Java 16 and build my project with gradle. I want to use gradle javadoc to generate a javadoc from my comments. But when i executed the command, I got following error:

error: tag not supported in the generated HTML version: font

The class comment this error refers to looks something like this:

/**
 * Websocket to handle changes.<br>
 * <font color="red">A RED COMMENT </font><br>
 * <font color="orange">AN ORANGE COMMENT</font>
 **/

Intellij shows me the comment exactly like i want, but I get this error while generating javadoc.

I did not configure the javadoc generation in the build.gradle or anywhere else. The only solution i found was to set the html version inside the javadoc step in build.gradle (Enable HTML5 Javadoc in Gradle) but this didn't change anything

Any idea?


Solution

  • It is probable that your version of Javadoc is using already using HTML5 which deprecated the <font> tag. You should use CSS for styling.