How Do I Comments Cascading Style Sheets Code lines

admin_img Posted By Bajarangi soft , Posted On 30-10-2020

In CSS Comments are used to explain the code, and may help when you edit the source code at a later date.Comments are ignored by browsers.A CSS comment is placed inside the style element, and starts with /* and ends with */ .So today we discuss how to do it.

How Do I Comments Cascading Style Sheets Code lines

Step 1: create index.html file and implement as below code in it.
 

<h2>Hello World!</h2>
<h3>Smaller heading!</h3>


Step 2:  implement as below css code in html file.
 

<style>
    body {
        background: pink;
    }
    /* This is
    a multi-line
    comment */
    h2, h3 {
        text-align: center;
        color: blueviolet; /* Set text color to blueviolet */
    }
</style>


Complete Code For Commenting Cascading Style Sheets Code lines.
 

<!DOCTYPE html>
<html>
<head>
    <title>How Do I Comments Cascading Style Sheets Code lines</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<style>
    body {
        background: pink;
    }
    /* This is
    a multi-line
    comment */
    h2, h3 {
        text-align: center;
        color: blueviolet; /* Set text color to blueviolet */
    }
</style>
<body>
<br/><br/>
<div class="container">
    <br><br><br>
    <div class="text-center">
<!--        How Do I Comments Cascading Style Sheets Code lines-->
        <h1 id="color" style="color: black;">How Do I Comments Cascading Style Sheets Code lines</h1>
    </div>
    <br>
    <div class="well">
        <h2>Hello World!</h2>
        <h3>Smaller heading!</h3>
    </div>
    <br>
</div>
</body>
</html>

Related Post