Geek Geek - 1 year ago 87
HTML Question

<tt> vs <code> elements when writing Java docs

To represent

while writing Java Docs should I use the
element or the
element? Are there specific situations when one should be preferred over the other?

Answer Source

For inline code in Javadocs,you should use {@code your-code-here}

See javadoc - {@code text} for more details.

Equivalent to <code>{@literal text}</code>.

Displays text in code font without interpreting the text as HTML markup or nested javadoc tags. ..

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download