<!DOCTYPE html>
<html>
<head>
<style type="text/css">
p.red::-moz-selection {
background: #FFB7B7 none repeat scroll 0% 0%;
background-color: #FFB7B7;
background-image: none;
background-repeat: repeat;
background-attachment: scroll;
background-position: 0% 0%;
background-clip: border-box;
background-origin: padding-box;
background-size: auto auto;
}
p.green::-moz-selection {
background: #A8D1FF none repeat scroll 0% 0%;
background-color: #9966CC;
background-image: none;
background-repeat: repeat;
background-attachment: scroll;
background-position: 0% 0%;
background-clip: border-box;
background-origin: padding-box;
background-size: auto auto;
}
</style>
</head>
<body>
<h1>.Net Intro</h1>
<p class="red">Hello everyone in C# corner</p>
<p class="green">.NET is a framework that executes every program or application that build under CLR. The .NET framework is a software development framework from Microsoft. It provides a controlled programming environment where software can be developed, installed and executed on Windows-based operating systems or web based or mobile based</p>
</body>
</html>In this Snippet I showed you how to change the background color of selected para in HTML using CSS.
