简体   繁体   English

是javadoc html还是xhtml?

[英]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: 今天早上我在IntelliJ中输入了一些Javadoc,并使用了一个<br>标签,IntelliJ以通常有用的方式自动完成了| | </br> ...但我的印象是,定义了<br>不要成为一个容器:

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

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. XHTML要求必须关闭所有打开的标记,即使它们不是容器标记。 Therefore, non-container tags end in />. 因此,非容器标签以/>结尾。 For example, the tag for a line break is <br />. 例如,换行符的标签是<br />。

So is Javadoc HTML or XHTML? Javadoc HTML或XHTML也是如此? It seems to me IntelliJ should be completing <br> to <br /> or leaving it alone. 在我看来,IntelliJ应该完成<br />或不管它。

http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html 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. 文档注释的格式文档注释是用HTML编写的,必须在类,字段,构造函数或方法声明之前。 It is made up of two parts -- a description followed by block tags. 它由两部分组成 - 描述后跟块标记。 In this example, the block tags are @param, @return, and @see. 在此示例中,块标记是@ param,@ return和@see。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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