Html-comment-tag
提供:Dev Guides
HTML-<コメント>および<!--….-→タグ
説明
HTML <comment>タグを使用すると、作成者はHTMLコードをコメントできます。 このタグはIEでのみサポートされています。
<!--….-→を使用してタグにコメントすることをお勧めします。 このタグは、すべてのブラウザーと互換性があります。
'_注-HTML5で非推奨となった<comment>タグ。 この要素は使用しないでください。_
例
<!DOCTYPE html>
<html>
<head>
<title>HTML <!--....--> Tag</title>
</head>
<body>
<comment>This is a commented line in IE</comment>
<!-- This is a commented line supported by almost every browser.
It will not appear in output as its a comment.
-->
</body>
</html>
これは、次の結果を生成します-
ブラウザのサポート
<comment>タグのブラウザサポート
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Not Supported | Not Supported | Yes | Not Supported | Not Supported | Not Supported |
<!--…-→タグのブラウザサポート
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |