Loading Please Wait...

Logo Lynxsia IT Solutions
CSS Syntax

To write CSS for HTML page, we use a combination of selector and declaration.

A selector select an HTML element such as paragraph, headings, etc.

A declaration is a block surrounded by curly braces. More than one declaration are separated by semicolon.

A declaration block consists of property name and property value pair separated by colon.

A CSS syntax generally look like below image:

css syntax
CSS Example

Below is a CSS example to style paragraph in HTML document.

Let's see with some example
					 
        
          p{
            background-color: red;
            color: white;
          }
        
      
Example Explained

p is the selector which select all the <p> element in HTML document.

background-color is the property name whereas red is the property value.

color is the property name whereas white is the property value.

It will male all the paragraph having red background and white color of the text.

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved