Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.41 KB

File metadata and controls

25 lines (16 loc) · 1.41 KB

CSS associates style rules with HTML elements

CSS works by associating rules with HTML elements. These rules govern how the content of specified elements should be displayed. A CSS rule contains two parts: a selector and a declaration.

  • what is selector ? indicate which element the rule applies to. The same rule can apply to more than one element if you separate the element names with commas.

  • what is declaration ? indicate how the elements referred to in the selector should be styled. Declarations are split into two parts (a property and a value), and are separated by a colon.

The elements displayed in css : you can declarations sit inside curly brackets and each is made up of two parts: a property and a value

  • what is properties ? indicate the aspects of the element you want to change. For example, color, font, width, height and border.

  • what is values ? specify the settings you want to use for the chosen properties. For example, if you want to specify a color property then the value is the color you want the text in these elements to be.