Comments

B

brucie

Is there any way of adding comments to your html code?

HTML comments have the following syntax:

<!-- this is a comment -->
<!-- and so is this one,
which occupies more than one line -->

White space is not permitted between the markup declaration open
delimiter("<!") and the comment open delimiter ("--"), but is
permitted between the comment close delimiter ("--") and the markup
declaration close delimiter (">"). A common error is to include a
string of hyphens ("---") within a comment. Authors should avoid
putting two or more adjacent hyphens inside comments.
http://www.w3.org/TR/html401/intro/sgmltut.html#idx-HTML
 
R

Richard

Blindsya said:
Is there any way of adding comments to your html code?

or try

// this is also a comment

<tr><td>this will be printed to screen</td></tr> // this will not be
printed to screen
 
S

Steve Pugh

Richard said:
or try

// this is also a comment

<tr><td>this will be printed to screen</td></tr> // this will not be
printed to screen

Rubbish.
// is a comment in JavaScript, not in HTML.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top