CSS Rule Block Example

A CSS rule block contains a selector followed by curly braces with properties inside.

Preview

Code

<style>
.box{
background:#e0f2fe;
padding:16px;
border-radius:6px;
}
</style>

<div class="box">This element is styled using a CSS rule block.</div>

More CSS Syntax Examples (5)