How do I make a comment in HTML?

Asked

Viewed 469 times

2

I wanted to know how to make a comment in Pycharm with HTML. The comment in Python is #, in C is // or /* */, and in HTML?

  • Complementing: in Python, you can comment with several lines with the '''.

  • I had edited the wrong answer, and now I was right, just to make clear the confusion I made, I had put content that was for my answer in Guto Xavier.

2 answers

8

Pycharm has nothing to do with it, he’s just an IDE. Read What is a programming language, IDE and compiler?.

Each language has its syntax for comments and other things. In HTML is the <!-- to open and --> to close. No comment form inline as is possible in the mentioned languages.

Then you can do something like this:

<div id = "exemplo">
<!-- comente aqui o que quer -->
<p>abc</p>

Other examples:

Tem um texto aqui <!-- the middle of --> com comentário no meio.

<!--
Pode ter
várias linhas de
comentário
-->

<div class="exemplo">
Pode ter uma construção normal e simular o *inline* desde que abra e feche.<br>
</div> <!-- /.exemplo -->

I put in the Github for future reference.

7


In html the comment is:

<!-- comentário -->

<!-- start of comment

--> end of comment

  • I’m sorry, I went to edit my reply and I ended up editing your reverti now.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.