Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is javadoc html or xhtml?

I was typing some Javadoc into IntelliJ this morning and used a <br> tag, which IntelliJ autocompleted to <br>|</br> in its usual helpful way... but I'm under the impression that <br> is defined not to be a container:

http://www.washington.edu/accessit/webdesign/student/unit2/common_tags.htm says:

A few tags are called non-container tags, because they don't contain any content - they stand alone. Examples are images and line breaks. XHTML requires that all open tags must be closed, even if they're not container tags. Therefore, non-container tags end in />. For example, the tag for a line break is <br />.

So is Javadoc HTML or XHTML? It seems to me IntelliJ should be completing <br> to <br /> or leaving it alone.

like image 352
android.weasel Avatar asked Nov 03 '22 09:11

android.weasel


1 Answers

http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html

Format of a Doc Comment A doc comment is written in HTML and must precede a class, field, constructor or method declaration. It is made up of two parts -- a description followed by block tags. In this example, the block tags are @param, @return, and @see.

like image 123
android.weasel Avatar answered Nov 30 '22 21:11

android.weasel