2017-06-14 368 views
0

我在一些HTML代碼中發現了一個我從未見過的標籤:什麼是<comment>Some comment</comment>標籤,它與<!-- Another comment -->有什麼不同?<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

你能提供一些你從哪裏看到的信息嗎? – Swellar

+0

不知道,但你可能誤導我猜。 –

回答

5

有一個在HTML沒有<comment>元件(元件,其在語言中出現的the specification列表)。瀏覽器會像處理其他非標準標籤一樣對待它,並執行錯誤恢復(使用默認樣式將其插入到DOM中)。