Declaration

The Declaration

h1 is the selector, color is thew property: #0000ff is the value of the decloration

The basic syntax of the declaration is a property (color in our example ) a colon then a value (#0000ff) terminated by a semicolon. Both the property and the value may have more than one keyword if allowed by the value. A example of this is p { font: 12px ariel}</p>. In rarer and specific cases the keywords of the value may be separated by a slash instead of a space such as: p { font: 12px/150% serif}(which translates to paragraph using a serif font of 12 pixels and 150% line-height. Also the declaration may have many property - value pairs separated by semicolons like this: p { font-family: ariel, sans-serif; font-size: 12 px; color: #000000; font-weight: 600;}


PREVIOUS NEXT