How To Set The Color Of Text Using Cascading Style Sheets

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

Using CSS we can Change text color for specified html elements .So today we discuss how to do it .

How To Set The Color Of Text Using Cascading Style Sheets

Create index.html file and implement as below code in it.

 

<h3 style="color:Tomato;">Hello World Welcome to BajarangiSoft To Learn More About CSS</h3>

<p style="color:DodgerBlue;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>

<p style="color:MediumSeaGreen;">Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>



Complete Code For Setting The Color Of Text Using Cascading Style Sheets

 

<!DOCTYPE html>
<html>
<head>
    <title>How To Set The Color Of Text Using Cascading Style Sheets</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: chocolate;
    }
</style>
<body>
<br/><br/>
<div class="container">
    <br><br><br>
    <div class="text-center">
        <h1 id="color" style="color: white;">Set The Color Of Text Using Cascading Style Sheets</h1>
    </div>
    <br>
    <div class="well">
        <h3 style="color:Tomato;">Hello World Welcome to BajarangiSoft To Learn More About CSS</h3>

        <p style="color:DodgerBlue;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>

        <p style="color:MediumSeaGreen;">Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>

    </div>
    <br>
</div>
</body>
</html>

Related Post