How to learn HTML Comment in HTML

Comment in HTML

The purpose of commenting in HTML is to let your co-worker know that I am designing a web page for a company today as a web designer. Maybe after tomorrow’s sum, I will resign and some other employee will come and work on the same web page so that what I am writing today will help him.

I can explain why I put specific tags or what I did when designing the web page. So there will be cycles inside the comments. Writing a Comment in HTML is a good practice when you are working on a large document. It will help you. In a few days, I will make a bigger document like today. I can read age comments and I’ll get my information back

Why do developers write comments in HTML?

If you are a developer, one thing you will notice is that we have to code a lot when we are working on a website or project. There is a system that can give an overview of what we have done with the code. Through Comment L, we can understand in the future what this code has been used for.

They have to read various problems. You can understand better by giving examples. Suppose people are working for 10 people on one project. Now one person will not be able to understand another person’s code. If you don’t use the Comment, your ability to understand it is reduced by 80%. If you use the Comment in HTML, your ability to understand it increases by 80%.

<!-- a html comment  -->

Why write HTML comments?

So let’s see how to write an HTML comment now. I have already created a demo page in the context of the comment. The comment where I gave the title does not come up in the browser then you can type some information about a particular category or your web page which will be helpful for new developers or new designers who will work on the same page and after typing the text you can do it again. Can stop.

Close the bracket so let’s save it and come to the browser where it was refreshed and see that the comment does not come in the browser but I can’t see any comment at the top of the tour.

How do you write comments in HTML?

You will need  <! — (text) -> symbols to write comments in HTML. So it will be in the form of comments that will not be seen in the web browser. This comment is very important for a developer or designer. This allows a developer to understand what the code is written about if you use vs code. Then you don’t have to bother, you can comment using vs code shortcut. The shortcut is Ctrl + / and if you do not use vs code. If you want to download vs code now, your coding will help them.

What is a comment tag in HTML?

An HTML comment tag is a tag that contains data that cannot be viewed on a website. To view it you need to go to the view page source. Then you can view the commenting data. I have discussed this many times above.

How do I comment in HTML with the keyboard?

You can use Ctrl + / to write HTML comments, but if you want to create your shortcut, follow the steps below.

  1. The first step
    All you have to do is open vs code. Once opened, you will see a bar on the left side of vs code where there is a setting icon. Click there.
  2. The second step
    Once it opens, click on the keyboard shortcut. You will see a search card at the top. There you can type comments. After writing the comment, many results will come down
  3. The last step
    From there you can click on the toggle block comment. After double-clicking, if no bar is open then you will see an icon on its left side. Click on that icon. With you will comment on the subject

How do you comment multiple lines in HTML?

There is another code in HTML that you do not need to use the code before commenting on multiple likes. That is / * text / * it is given inside if you want to the comment will work for more than nine. You have to use a * in front of it. It is used to comment on any type of code. If you give an example, you will understand better.

Suppose you are working on a project. Now you have to comment on a function. The function has 10 line codes. Now if you want to do this function in one line then maybe one of the codes will be deleted as of a result. There may be an error in your code later. To get rid of this problem, more than one comment is used. You will not have to face any problem with this comment.

Code examples

<! DOCTYPE html>  
      <title> HTML Comments </title>
            <! - This Is a Comment -> <! - ->        
      <h2> This Headline Is Out Of Comment. </h2>
      <h3> This Headline Is Inside Of Comment. </h3>
            <! -        
         <p> We can easily find that section by looking at the comments in a short time. Moreover, many times we are grouped on the web siteYou have to make it. If someone does design work, maybe someone else does development work. Then the code that the designer did is the developerThe section of the help codes of this comment can be easily found. Comments are not visible in the browser. Comments are designer onlyThis is done for the benefit of the developer. </p>
      <p> It will be displayed in the browser as it is out of comment. </p>

Related Posts


Preg_match_all in php

The Basic Concept of the PHP preg_match_all Function The PHP preg_match_all function is a pattern-matching function that matches the text. This function is use to search for…


what is document.queryselector in javascript

What is document.querySelector() in Javascript? The javascript document.querySelector() method retrieves. The element with the given tag name or id from within a document. The document.querySelector() method returns…

JQuery hide Method.jpg

JQuery hide Method

What can the JQuery Hide Method Do For You? The JQuery Hide Method is a function that one can use to hide text on a website. It…

Push array in php.jpg

Push array in php

What is a php Push Array? A push array is a PHP data type that can store an arbitrary number of values. The push array is a…

How to use map method in javascript.jpg

How to use map method in javascript

What is the Map Method? The map method is a higher-order function in JavaScript. Who can use it to transform an array into another array by iterating…

Splice an array javascript.JPG

Splice an array javascript

Splicing Practices and their Applications Splice is a JavaScript function that Who Who can use to create a new array from an existing one by adding or…

This Post Has One Comment

Leave a Reply

Your email address will not be published.

Education Template