;

How To Create Comments In HTML

Learn to Add Comments in HTML


How To Create / add / insert / using Comments In HTML

buayaberdiri.blogspot.com - The html element has many lines of code, and the code is usually displayed. In this session we will try to insert html code whose results will not be displayed on a website or blog.

Comments in html is a line of html code that serves to display information in several lines of code that we want, but lines of code or writing in comments are not displayed.

To make a comment we need the code <!-- -->

Example of making comments in html :

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="index01.js"></script>
    <title>buayaberdiri.blogspot.com</title>
</head>
<body>
    <!-- This is comment in html-->
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Harum, dolor!</p>
</body>
</html>




Comments are also used to not display any other html line code, see this example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="index01.js"></script>
    <title>buayaberdiri.blogspot.com</title>
</head>
<body>
    <!-- This is comment in html-->
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Harum, dolor!</p>
    <!--
    <table>
        <tr>
            <td>This is Table</td>
        </tr>
    </table>
    -->
</body>
</html>


In the code example above we have commented on the table line of code, so the table will not be displayed in the browser.








List of Article Posts https://buayaberdiri.blogspot.com