single line comment in HTML

后端 未结 5 2049
不知归路
不知归路 2021-01-31 01:05

Is there a way to comment out a single line in HTML using just an escape sequence at the start of the line? Similar to using # or // in other languages

5条回答
  •  情话喂你
    2021-01-31 01:49

    Let's keep it simple. Loved @digitaldreamer 's answer but it might leave the beginners confused. So, I am going to try and simplify it.

    The only HTML comment is It can be used as a single line comment or double, it is really up to the developer.

    So, an HTML comment starts with . It is really that simple. You should not use any other format, to avoid any compatibility issue even if the comment format is legit or not.

提交回复
热议问题