Welcome Guest! (App Version 3.1)

websitnero logo name

New Color Formats

New Color Formats added in CSS3

Two new color formats are now available RGB and HSL. Earlier, we used to mention color by its name or by its hexcode. For example, background:red or background:#ff2233. There was no other way to define color or background-color of any element.

Now, CSS3 specifies that you can do so in 2 more formats.

Example

<head>
<style>
p{width:200px;height:100px;}
.p1{background:rgba(255, 0, 0, 0.5);}
.p2{background:hsla(120, 100%, 50%, 0.5)}
</style>
</head>

<body> 
  <p class="p1">This is paragraph 1.</p>
  <p class="p2">This is paragraph 2.</p>
</body>
WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.