How To Set The Color Of Borders For HTML Elements Using CSS

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

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

How To Set The Color Of Borders For HTML Elements Using CSS

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

<h1 style="border:2px solid Tomato;">Hello World</h1>
<h1 style="border:2px solid DodgerBlue;">Hello World</h1>
<h1 style="border:2px solid Violet;">Hello World</h1>


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

<!DOCTYPE html>
<html>
<head>
    <title>How To Set The Color Of Borders For HTML Elements Using CSS</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 Borders For HTML Elements Using CSS</h1>
    </div>
    <br>
    <div class="well">
        <h1 style="border:2px solid Tomato;">Hello World</h1>
        <h1 style="border:2px solid DodgerBlue;">Hello World</h1>
        <h1 style="border:2px solid Violet;">Hello World</h1>
    </div>
    <br>
</div>
</body>
</html>

 

Related Post