The most viewed posts

Contact Me

About Me

Myanmar font and keyboard for Windows

Registry Reviver

IT Support & Endpoint Management

Digital Platforms & Web Solutions

How to clean up Windows Computer

Driver Booster

CCleaner

About Desktop Icons in Windows Computer

The most viewed items

Dell Inspiron 5559

SONY Playstation Portable

HP ProBook 430

Laptop RAM

External Hard Disk

Laptop

Desktop Hard Disk

Please login to start chat

ZilaStar ICT Dec 01 2025, 19:21:18

CSS Rules

CSS rule is a fundamental building block of cascading style sheets. We use it to style HTML Elements.

A rule consists of:

           Selector -> which elements the rules applied to

           Declaration block -> one or more style declarations inside { }

           Declaration -> property + value pair

 

CSS Rule Structure

            Selector{

            Property: value

 }


. Selector: Targets HTML Elements (head, body, div, p, etc.)

. Property: The style you want to change (color, font-size, padding, etc.)

. Value: The settings for that property (red, 13px, 10px, etc.)

 

Types of CSS Rules

  Element selector -> p {font-size: 12px;}

  Class selector -> .div{padding: 10px;} 

  ID selector -> #body{background-color: wheat;}

  Group selector -> h1, body, div, p{font-family: arial;}

  Descendant selector -> div p{font-size: 12px;}

  Pseudo-classes -> a:hover{color: blue;}

  Pseudo-elements -> p::first-line{font-weight: bold;}

...read more
To Contact
🙏 About Me
📜Terms and Conditions