I have some HTML code on a page that I don't want to erase, but make inactive for the short term. How can I make the browser ignore parts of the page in the same way the //
works in some programming languages?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
Just create a multi-line comment around it. When you want it back, just erase the comment tags.
For example,
<!-- Stuff to comment out or make inactive -->
HTML Comments:
See Reference
CSS Comments:
See Reference
JavaScript Comments:
OR
See Reference
To comment block with nested comments: substitute inner (block) comments from "--" to "++"
Thus, the outer most comment ignores all "invalid" inner (block) comments.
Use:
For more information, I think 3 On SGML and HTML may help you.
Reason of comments:
HTML Comments
Behold HTML comments:
http://www.w3.org/TR/html401/intro/sgmltut.html#idx-HTML
The proper way to delete code without deleting it, of course, is to use version control, which enables you to resurrect old code from the past. Don't get into the habit of accumulating commented-out code in your pages, it's no fun. :)