什么是<comment>标签?

时间:2017-06-14 07:53:50

标签: html html5 tags

我在一些HTML代码中找到了一个我以前从未见过的标记:<comment>Some comment</comment>标记是什么?它与<!-- Another comment -->有什么不同?

编辑:这是一段代码。

    <object 
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" 
    codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,5" 
    width="130" height="25" name="SmartCardSignerApplet"> 
    <param name="code" value="SmartCardSignerApplet"> 
    <param name="archive" value="SmartCardSignerApplet.jar"> 
    <param name="mayscript" value="true"> 
    <param name="type" value="application/x-java-applet;version=1.5"> 
    <param name="scriptable" value="false"> 
    <param name="fileNameField" value="fileToBeSigned"> 
    <param name="certificationChainField" value="certificationChain"> 
    <param name="signatureField" value="signature"> 
    <param name="signButtonCaption" value="Sign selected file"> 

    <comment> 
        <embed 
            type="application/x-java-applet;version=1.5" 
            code="SmartCardSignerApplet" archive="SmartCardSignerApplet.jar" 
            width="130" height="25" scriptable="true" 
            pluginspage="http://java.sun.com/products/plugin/index.html#download" 
            fileNameField="fileToBeSigned" 
            certificationChainField="certificationChain" 
            signatureField="signature" 
            signButtonCaption="Sign selected file"> 
        </embed> 
        <noembed> 
            Smart card signing applet can not be started because 
            Java Plugin 1.5 or newer is not installed. 
        </noembed> 
    </comment> 
</object> 

1 个答案:

答案 0 :(得分:5)

HTML中没有<comment>元素(the specification中显示该语言中 的元素列表)。浏览器会将其视为任何其他非标准标记,并执行错误恢复(使用默认样式将其插入DOM)。