Home | Computers | Codes & Signals | DIY | Marginal Science | Security & Safety | Society | Miscellaneous        stolons: Worklooker | Monkeydoit | JobSpector

How to Use HTML Comment Tag Code to Comment Something Out

Syntax for commenting something out inside HTML source using HTML Comment Tag Code.

To comment something out using the comment tag simply apply the following:

<!--Your source comment, text or script you want to hide goes here. It will be hidden from users viewing your page unless they view the HTML source-->

Steps to create an HTML Comment Tag:

1. Open your tag with the "less than" < symbol as you do with HTML tags and follow this symbol with an exclamation point and two dashes.


<!-- This will contain your comments or hide code and is applied within your page's source code. The <!-- syntax will directly precede any comment, text or script you want to hide.

2. Close your tag with -->, that's two dashes followed by the "greater than" symbol to close your comment tag. The exclamation point is NOT repeated inside the closing tag.