简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM