Top Ads

What is CSS Syntax and Selectors

A style rule is made of three parts −

    Selector − A selector is an HTML tag at which a style will be applied. This could be any tag like <h1>,<h2>.......<h6> or <table> etc.


    Property - A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color, border etc.


    Value - Values are assigned to properties. For example, color property can have value either red or #F2F2F2 etc.