syntax of css in web development

By: Prof. Dr. Fazal Rehman Shamil | Last updated: March 3, 2022

What is the syntax for defining CSS?

Defining one property to one selector:

  • Selector { property: Value; }

Defining two or multiple properties to one selector:

  • Selector { property: Value; property:value;}

Example: 

h2font size:18pxcolorpink
SelectorPropertyValuePropertyValue

 

Leave a Reply