Sunteți pe pagina 1din 3

8/20/2014 HTML comment tag

http://www.w3schools.com/tags/tag_comment.asp 1/3
REFERENCES | EXAMPLES | FORUM
HTMLReference
HTMLbyAlphabet
HTMLbyCategory
HTMLGlobalAttributes
HTMLEvents
HTMLCanvas
HTMLAudio/Video
HTMLDoctypes
HTMLColornames
HTMLColorpicker
HTMLColormixer
HTMLCharacterSets
HTMLURLEncode
HTMLLanguageCodes
HTMLCountryCodes
HTTPMessages
HTTPMethods
KeyboardShortcuts
HTMLTags
<!>
<!DOCTYPE>
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdi>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<dir>
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<head>
<header>
<h1><h6>
Previous CompleteHTMLReference Next
Previous CompleteHTMLReference Next
HTML<!...>Tag
Example
AnHTMLcomment:
<!Thisisacomment.Commentsarenotdisplayedinthebrowser>
<p>Thisisaparagraph.</p>
TryitYourself
DefinitionandUsage
Thecommenttagisusedtoinsertcommentsinthesourcecode.Commentsarenotdisplayedinthebrowsers.
Youcanusecommentstoexplainyourcode,whichcanhelpyouwhenyoueditthesourcecodeatalaterdate.Thisisespeciallyusefulif
youhavealotofcode.
BrowserSupport
Element
<!...> Yes Yes Yes Yes Yes
DifferencesBetweenHTML4.01andHTML5
NONE.
TipsandNotes
Youcanalsousethecommenttagto"hide"scriptsfrombrowserswithoutsupportforscripts(sotheydon'tshowthemasplaintext):
<scripttype="text/javascript">
<!
functiondisplayMsg()
{
alert("HelloWorld!")
}
//>
</script>
Note:Thetwoforwardslashesattheendofcommentline(//)istheJavaScriptcommentsymbol.ThispreventsJavaScriptfromexecuting
the>tag.
StandardAttributes
Thecommenttagdoesnotsupportanystandardattributes.
MoreinformationaboutStandardAttributes.
EventAttributes
Thecommenttagdoesnotsupportanyeventattributes.
MoreinformationaboutEventAttributes.
Searchw3schools.com:
WEBHOSTING
WEBBUILDING
W3SCHOOLSEXAMS
HTML,CSS,JavaScript,PHP,
jQuery,XML,andASP
Certifications
SHARETHISPAGE
WEBRESOURCES
WebStatistics
WebValidation
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
Select Language
8/20/2014 HTML comment tag
http://www.w3schools.com/tags/tag_comment.asp 2/3
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<kbd>
<keygen>
<label>
<legend>
<li>
<link>
<main>
<map>
<mark>
<menu>
<menuitem>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
Top10Tutorials
HTMLTutorial
HTML5Tutorial
CSSTutorial
CSS3Tutorial
JavaScriptTutorial
jQueryTutorial
SQLTutorial
Top10References
HTML/HTML5Reference
CSS1,2,3Reference
CSS3BrowserSupport
JavaScript
HTMLDOM
XMLDOM
PHPReference
Top10Examples
HTMLExamples
CSSExamples
JavaScriptExamples
HTMLDOMExamples
PHPExamples
jQueryExamples
XMLExamples
WebCertificates
HTMLCertificate
HTML5Certificate
CSSCertificate
JavaScriptCertificate
jQueryCertificate
PHPCertificate
XMLCertificate
ColorPicker
8/20/2014 HTML comment tag
http://www.w3schools.com/tags/tag_comment.asp 3/3
REPORTERROR | HOME | TOP | PRINT | FORUM | ABOUT | ADVERTISEWITHUS
PHPTutorial
ASP.NETTutorial
XMLTutorial
jQueryReference
ASP.NETReference
HTMLColors
XMLDOMExamples
ASPExamples
SVGExamples
ASPCertificate
W3Schoolsisoptimizedforlearning,testing,andtraining.Examplesmightbesimplifiedtoimprovereadingandbasicunderstanding.Tutorials,references,andexamplesareconstantlyreviewedtoavoid
errors,butwecannotwarrantfullcorrectnessofallcontent.Whileusingthissite,youagreetohavereadandacceptedourtermsofuse,cookieandprivacypolicy.Copyright19992014byRefsnesData.
AllRightsReserved.

S-ar putea să vă placă și